Initial Release 6

Function : LDAP
ldap_search_s - Synchronous search of the LDAP directory.
----------------------------------------------------------------------------------------------------------

#include <ldap.h>

int LNPUBLIC ldap_search_s(
LDAP *ld,
const char *base,
int scope,
const char *filter,
char **attrs,
int attrsonly,
LDAPMessage **res);

Description :

This function performs a synchronous search of the LDAP directory and returns a requested set of attributes for each entry matched.

Parameters :

Sample Usage :

   
    /* Perform search */
    printf("\n  Search results:\n\n");

    if ( ldap_search_s( ld, SEARCHBASE, LDAP_SCOPE_SUBTREE,
                        FILTER, NULL, 0, &result ) != LDAP_SUCCESS )
    {
         ldap_perror( ld, "ldap_search_s" );
         if ( result == NULL )
         {
             ldap_unbind_s( ld );
             NotesTerm();
             return( 1 );
         }
    }


See Also :

LDAP_SCOPE_xxx
----------------------------------------------------------------------------------------------------------