ldap_delete_ext()--Perform an LDAP Delete Operation with Controls


  Syntax
 #include <ldap.h>
 
 int ldap_delete_ext(LDAP           *ld,
                    const char     *dn,
                    LDAPControl    **serverctrls,
                    LDAPControl    **clientctrls,
                    int            *msgidp)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_delete_ext() routine initiates an asynchronous LDAP operation to delete a leaf entry with controls.

Note that the entry to delete must be a leaf entry (that is, it must have no children). Deletion of entire subtrees in a single operation is not supported by LDAP.


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(), ldap_ssl_init(), or ldap_open().
dn
(Input) Specifies the Distinguished Name (DN) of the entry to be deleted.
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.
msgidp
(Output) This result parameter is set to the message id of the request if the ldap_delete_ext() call succeeds.

Return Value

LDAP_SUCCESS
if the request was successfully sent, ldap_delete_ext() places the message id of the request in *msgidp. A subsequent call to ldap_result() can be used to obtain the result of the operation. Once the operation has completed, ldap_result() returns a result that contains the status of the operation (in the form of an error code). The error code indicates if the operation completed successfully.

another LDAP error code
if the request was not successfully.

Error Conditions

The ldap_delete_ext() API will return an LDAP error code if not successful. 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_delete_ext API.


Related Information

The ldap_delete_ext() API supports LDAP V3 server controls and client controls.


API introduced: V4R5

[ Back to top | LDAP APIs | APIs by category ]