ldap_url_search_s() function searches the directory for matching entries, based on the contents of the URL.
ldap_url_search_s() is a synchronous function, which directly returns the results of the operation. If you want to perform other operations while waiting for the results of this operation, call the asynchronous function ldap_url_search() instead. (For more information on asynchronous and synchronous functions, see "Calling Synchronous and Asynchronous Functions" on page 80.)
For more information on processing LDAP searches specified as URLs, see "Processing an LDAP URL" on page 254.
#include <ldap.h>
int ldap_url_search_s( LDAP *ld, char *url, int attrsonly,
LDAPMessage **res );
ld |
Connection handle, which is a pointer to an |
url | |
attrsonly | |
res |
LDAP_SUCCESS if successful. #include <stdio.h>
#include <ldap.h>
...
LDAP *ld;
LDAPMessage *result;
char *my_url = "ldap://ldap.netscape.com/o=Airius.com?cn,mail,telephoneNumber?sub?(sn=Jensen)";
...
/* Process the search request in the URL */
if ( ldap_url_search_s( ld, my_url, 0, &result ) != LDAP_SUCCESS ) {ldap_perror( ld, "ldap_url_search_s" );
return( 1 );
}
...
ldap_search(), ldap_search_st().
Last Updated: 10/01/98 17:06:23