HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
slapi_ldap_unbind( ld );
return 0;
}
Syntax
#include "slapi-plugin.h"
LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure,
int shared );
Parameters This function takes the following parameters:
Space-delimited list of one or more host names (or IP address in dotted notation, such
as 141.211.83.36) of the LDAP servers to which you want to connect. The names
can be in hostname:portnumber format, in which case portnumber overrides the
port number specified by the ldapport argument.
ldaphost
Port number of the LDAP server.
ldapport
Determines whether to establish the connection over SSL. Set this to a nonzero value
to establish the connection over SSL.
secure
Determines whether the LDAP session (the LDAP structure) can be shared by different
threads. Set this to a nonzero value to allow multiple threads to share the session.
shared
Returns This function returns one of the following values:
If successful, returns a pointer to an LDAP structure, which should be passed to subsequent
calls to other LDAP API functions.
If unsuccessful, returns NULL.
29.2 slapi_ldap_unbind()
Unbinds from another LDAP server and frees the resources contained in the LDAP structure.
Description This function unbinds from another LDAP server. Call this function if you initialized
the LDAP session with the “slapi_ldap_init()” function. Do not call the ldap_unbind() or
ldap_unbind_s() functions provided with the HP Directory SDK.
Syntax
#include "slapi-plugin.h"
void slapi_ldap_unbind( LDAP *ld );
Parameters This function takes the following parameter:
Connection handle, which is a pointer to an LDAP structure containing information
about the connection to the LDAP server.
ld
252 Functions for thread-safe LDAP connections