ldap_set_option() sets session preferences in the LDAP structure. For more information on the options you can set, see "Setting Preferences" on page 53.
#include <ldap.h>
int ldap_set_option( LDAP *ld, int option, void *optdata );
ld |
Connection handle, which is a pointer to an |
option | |
optdata |
#include <stdio.h>
#include <ldap.h>
...
LDAP *ld;
int max_ret = 100, max_tim = 30;
char *host = "ldap.netscape.com";
...
/* Initialize a session with the LDAP server ldap.netscape.com:389 */
if ( ( ld = ldap_init( host, LDAP_PORT ) ) == NULL ) { perror( "ldap_init" );
return( 1 );
}
/* Set the maximum number of entries returned */
if (ldap_set_option( ld, LDAP_OPT_SIZELIMIT, &max_ret) != LDAP_SUCCESS) {ldap_perror( ld, "ldap_set_option" );
return( 1 );
}
...
ldap_init(), ldap_get_option().
Last Updated: 10/01/98 17:06:23