#include <ldap.h>
int ldap_extended_operation( LDAP *ld, const char *requestoid,
struct berval *requestdata, LDAPControl **serverctrls,
LDAPControl **clientctrls, int *msgidp );
ld |
Connection handle, which is a pointer to an |
requestoid | Object identifier (OID) of the extended operation that you want the server to perform. |
requestdata |
Pointer to a |
serverctrls |
Pointer to an array of |
clientctrls |
Pointer to an array of |
msgidp |
Pointer to an integer that will be set to the message ID of the LDAP operation. To check the result of this operation, call |
LDAP_SUCCESS if successful. LDAP_PARAM_ERROR if any of the arguments are invalid. LDAP_ENCODING_ERROR if an error occurred when BER-encoding the request. LDAP_SERVER_DOWN if the LDAP server did not receive the request or if the connection to the server was lost. LDAP_NO_MEMORY if memory cannot be allocated. LDAP_NOT_SUPPORTED if your LDAP client does not specify that it is using the LDAP v3 protocol. Make sure that you set the version of your LDAP client to version 3 before calling this function. (For details, see "Specifying the LDAP Version of Your Client" on page 54.) ldap_extended_operation() function sends a request to the server to perform an LDAP v3 extended operation synchronously.
The LDAP server must support the extended operation. The Netscape Directory Server 3.0 supports a server plug-in interface that you can use to add support for extended operations to the server. For details, see the Netscape Directory Server 3.0 Programmer's Guide.
For information on determining the extended operations supported by a server, see "Determining the Extended Operations Supported" on page 308.
After processing an LDAP v3 extended operation, an LDAP server can return an object identifier and data in the result. To parse the OID and data from the result, call the ldap_parse_extended_result() function.
ldap_extended_operation() is an asynchronous function; it does not directly return results. If you want the results to be returned directly by the function, call the synchronous function ldap_extended_operation_s() instead. (For more information on asynchronous and synchronous functions, see "Calling Synchronous and Asynchronous Functions" on page 80.)
In order to get the results of the LDAP extended operation, you need to call the ldap_result() function, the ldap_parse_extended_result() function, and the ldap_get_lderrno() function. (See "Performing an Asynchronous Extended Operation" on page 309 for details.) For a list of possible result codes for an LDAP extended operation, see the result code documentation for the ldap_extended_operation_s() function.
ldap_extended_operation_s(), ldap_result(), ldap_parse_extended_result(), ldap_get_lderrno().
Last Updated: 10/01/98 17:06:23