ldap_unbind()--Perform an LDAP Unbind Request
Syntax
#include <ldap.h> int ldap_unbind( LDAP *ld )
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_unbind() function is used to end the connection to the LDAP server and free the resources contained in the ld structure.
Once it is called, any open connection to the LDAP server is closed, and the ld structure is invalid. The ldap_unbind_s() and ldap_unbind() APIs are both synchronous, and can be used interchangeably.
Authorities and Locks
No IBM® i authority is required.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
Return Value
- LDAP_SUCCESS
- if the request was successful.
- LDAP error
- if the request was not successful.
Error Conditions
If ldap_unbind() is not successful, it returns an LDAP error code other than LDAP_SUCCESS. See LDAP Client API Error Conditions for possible LDAP error code values.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_unbind API. |
Related Information
- ldap_bind() -- Asynchronously bind to the directory (deprecated).
- ldap_bind_s() -- Synchronously bind to the directory (deprecated).
- ldap_sasl_bind() -- Asynchronously bind to the directory using SASL.
- ldap_sasl_bind_s() -- Synchronously bind to the directory using SASL.
- ldap_simple_bind() -- Asynchronously bind to the directory using simple authentication.
- ldap_simple_bind_s() -- Synchronously bind to the directory using simple authentication.
- ldap_unbind_ext() -- Perform an LDAP Unbind Request
- ldap_unbind_s() -- Synchronously unbind from the LDAP server and close the connection.
- ldap_set_rebind_proc() -- Sets the entry-point of a routine during the chasing of referrals.
API introduced: V4R3
[ Back to top | LDAP APIs | APIs by category ]