ldap_bv2escaped_filter_value_x LDAP_P(( struct berval *in, struct berval *out,
        int inplace, void *ctx ));
 
+LDAP_F (int) ldap_pvt_search LDAP_P((
+       struct ldap *ld,
+       LDAP_CONST char *base,
+       int scope,
+       LDAP_CONST char *filter,
+       char **attrs,
+       int attrsonly,
+       struct ldapcontrol **sctrls,
+       struct ldapcontrol **cctrls,
+       struct timeval *timeout,
+       int sizelimit,
+       int deref,
+       int *msgidp ));
+
+LDAP_F(int) ldap_pvt_search_s LDAP_P((
+       struct ldap *ld,
+       LDAP_CONST char *base,
+       int scope,
+       LDAP_CONST char *filter,
+       char **attrs,
+       int attrsonly,
+       struct ldapcontrol **sctrls,
+       struct ldapcontrol **cctrls,
+       struct timeval *timeout,
+       int sizelimit,
+       int deref,
+       struct ldapmsg **res ));
+
 /* string.c */
 LDAP_F( char * )
 ldap_pvt_str2upper LDAP_P(( char *str ));
 
 /*
  * in search.c
  */
-LDAP_F (int) ldap_int_search LDAP_P((
-       LDAP *ld,
-       LDAP_CONST char *base,
-       int scope,
-       LDAP_CONST char *filter,
-       char **attrs,
-       int attrsonly,
-       LDAPControl **sctrls,
-       LDAPControl **cctrls,
-       struct timeval *timeout,
-       int sizelimit,
-       int deref,
-       int *msgidp ));
-
-LDAP_F(int) ldap_int_search_s LDAP_P((
-       LDAP *ld,
-       LDAP_CONST char *base,
-       int scope,
-       LDAP_CONST char *filter,
-       char **attrs,
-       int attrsonly,
-       LDAPControl **sctrls,
-       LDAPControl **cctrls,
-       struct timeval *timeout,
-       int sizelimit,
-       int deref,
-       LDAPMessage **res ));
-
 LDAP_F (BerElement *) ldap_build_search_req LDAP_P((
        LDAP *ld,
        const char *base,
 
        int sizelimit,
        int *msgidp )
 {
-       return ldap_int_search( ld, base, scope, filter, attrs,
+       return ldap_pvt_search( ld, base, scope, filter, attrs,
                attrsonly, sctrls, cctrls, timeout, sizelimit, -1, msgidp );
 }
 
 int
-ldap_int_search(
+ldap_pvt_search(
        LDAP *ld,
        LDAP_CONST char *base,
        int scope,
        int sizelimit,
        LDAPMessage **res )
 {
-       return ldap_int_search_s( ld, base, scope, filter, attrs,
+       return ldap_pvt_search_s( ld, base, scope, filter, attrs,
                attrsonly, sctrls, cctrls, timeout, sizelimit, -1, res );
 }
 
 int
-ldap_int_search_s(
+ldap_pvt_search_s(
        LDAP *ld,
        LDAP_CONST char *base,
        int scope,
        int rc;
        int     msgid;
 
-       rc = ldap_int_search( ld, base, scope, filter, attrs, attrsonly,
+       rc = ldap_pvt_search( ld, base, scope, filter, attrs, attrsonly,
                sctrls, cctrls, timeout, sizelimit, deref, &msgid );
 
        if ( rc != LDAP_SUCCESS ) {
 
        /* deal with <draft-zeilenga-ldap-t-f> filters */
        filter = op->ors_filterstr;
 retry:
-       rs->sr_err = ldap_int_search( lc->lc_ld, op->o_req_dn.bv_val,
+       rs->sr_err = ldap_pvt_search( lc->lc_ld, op->o_req_dn.bv_val,
                        op->ors_scope, filter.bv_val,
                        attrs, op->ors_attrsonly, ctrls, NULL,
                        tv.tv_sec ? &tv : NULL,
        }
 
        /* TODO: timeout? */
-       rc = ldap_int_search_s( lc->lc_ld, ndn->bv_val, LDAP_SCOPE_BASE, filter,
+       rc = ldap_pvt_search_s( lc->lc_ld, ndn->bv_val, LDAP_SCOPE_BASE, filter,
                                attrp, 0, ctrls, NULL,
                                NULL, LDAP_NO_LIMIT, op->ors_deref, &result );
        if ( rc != LDAP_SUCCESS ) {
 
         * Starts the search
         */
        assert( msc->msc_ld != NULL );
-       rc = ldap_int_search( msc->msc_ld,
+       rc = ldap_pvt_search( msc->msc_ld,
                        mbase.bv_val, realscope, mfilter.bv_val,
                        mapped_attrs, op->ors_attrsonly,
                        ctrls, NULL, tvp, op->ors_slimit, op->ors_deref,