The ldap_extended_operation_s() function is used to perform
a synchronous LDAP extended operation, which returns LDAP_SUCCESS if the
extended operation completed successfully, or an LDAP error code if not. The
retoid and retdata parameters are filled in with the Object
IDentifier (OID) and data from the response. If no OID or data was returned,
these parameters are set to NULL, respectively.
If the LDAP server does not support the extended operation, the operation
will fail. 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 object identifier 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.
Authorities and Locks
No IBM® i authority is required. All authority checking is done by the LDAP
server.
(Input) Specifies the dotted-OID text string that identifies the extended
operation to be performed by the server.
reqdata
(Input) Specifies the arbitrary data required by the extended operation (if
NULL, no data is sent to the server).
serverctrls
(Input) Specifies a list of LDAP server controls. This parameter may be set
to null. See Controls for LDAP APIs for more information
about server controls.
clientctrls
(Input) Specifies a list of LDAP client controls. This parameter may be set
to null. See Controls for LDAP APIs for more information
about client controls.
retoidp
(Output) This result parameter is set to point to a character string that
is set to an allocated, dotted-OID text string returned from the server. This
string should be disposed of using the
ldap_memfree() API. If no OID is returned, *retoidp is set to
NULL.
retdatap
(Output) This result parameter is set to a pointer to a berval structure
pointer that is set to an allocated copy of the data returned by the server.
This struct berval should be disposed of using ber_bvfree().
If no data is returned, *retdatp is set to NULL.
Return Value
LDAP_SUCCESS
if the request was successful.
another LDAP error code
if the request was not successful.
Error Conditions
If ldap_extended_operation_s() is not successful, it will
return the LDAP error code resulting from the operation.
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_extended_operation_s API.