ldap_extended_operation_s()--Perform extended operations synchronously
Syntax
#include <ldap.h> int ldap_extended_operation_s( LDAP *ld, const char *reqoid, const struct berval *reqdata, LDAPControl **serverctrls, LDAPControl **clientctrls, char **retoidp, struct berval **retdatap)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
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.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init() or ldap_ssl_init().
- reqoid
- (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. |
Related Information
- ber_bvfree() -- Free a berval Structure
- ldap_add_ext() -- Asynchronously add an entry with controls.
- ldap_add_ext_s() -- Synchronously add an entry with controls.
- ldap_compare_ext() -- Asynchronous compare to a directory entry with controls.
- ldap_compare_ext_s() -- Synchronous compare to a directory entry with controls.
- ldap_delete_ext() -- Asynchronous delete an entry with controls.
- ldap_delete_ext_s() -- Synchronous delete an entry with controls.
- ldap_modify_ext() -- Asynchronously modify an entry with controls.
- ldap_modify_ext_s() -- Synchronously modify an entry with controls.
- ldap_rename() -- Asynchronously rename an entry with controls.
- ldap_rename_s() -- Synchronously rename an entry with controls.
- ldap_sasl_bind() -- Asynchronously bind to the directory using the Simple Authentication Security Layer (SASL).
- ldap_sasl_bind_s() -- Synchronously bind to the directory using the Simple Authentication Security Layer (SASL).
- ldap_search_ext() -- Asynchronously search the directory with controls.
- ldap_search_ext_s() -- Synchronously search the directory with controls.
- ldap_unbind_ext() -- Unbind with controls.
The ldap_extended_operation_s() API supports LDAP V3 server controls and client controls.
API introduced: V5R1
[ Back to top | LDAP APIs | APIs by category ]