#include <ldap.h> int ldap_extended_operation( LDAP *ld, const char *reqoid, const struct berval *reqdata, LDAPControl **serverctrls, LDAPControl **clientctrls, int *msgidp)
The ldap_extended_operation() function is used to initiate an asynchronous extended operation, which returns LDAP_SUCCESS if the extended operation was successfully sent, or an LDAP error code if not. If successful, the ldap_extended_operation() API places the message id of the request in *msgid. A subsequent call to ldap_result() can be used to obtain the result of the extended operation, which can then be passed to ldap_parse_extended_result() to obtain the Object IDentifier (OID) and data contained in the response.
If the LDAP server does not support the extended operation, the server will reject the request. To determine if the requisite extended operation is supported by the server, get the rootDSE of the LDAP server, and check for the supportedExtension attribute. If the values for this attribute include the OID of your extended operation, then the server supports the extended operation. If the supportedExtension attribute is not present in the rootDSE, then the server is not configured to support any extended operations.
No i5/OS authority is required. All authority checking is done by the LDAP server.
If ldap_extended_operation() is not successful, will return a -1 instead of a valid msgid, setting the session error in the LD structure, which can be obtained by using ldap_get_errno().
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_extended_operation API. |
The ldap_extended_operation() API supports LDAP V3 server controls and client controls.
Top | LDAP APIs | APIs by category |