ldap_add_ext_s()--Perform an LDAP Add Operation with Controls (Synchronous)




Syntax

#include <ldap.h>
 
int ldap_add_ext_s(LDAP      *ld,
                 char        *dn,
                 char        *attr,
	         LDAPControl **serverctrls,
                 LDAPControl **clientctrls)



Threadsafe: Yes

The ldap_add_ext_s() function is used to perform synchronous LDAP add operation with controls.

Authorities and Locks

No OS/400 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) The DN of the entry to add

attrs
(Input) Specifies the attribute type to use in the comparison.

serverctrls
(Input) Specifies a list of LDAP server controls. This parameter may be set to null. See LDAP Controls for more information about server controls.

clientctrls
(Input) Specifies a list of LDAP client controls. This parameter may be set to null. See LDAP Controls for more information about client controls.

Note that all entries except that specified by the last component in the given DN must already exist.

Return Value

LDAP_SUCCESS
if the request was successful.
another LDAP error code
if the request was not successful.

Return Value

Message ID of the operation initiated
if the request was successfully sent. A subsequent call to ldap_result(), can be used to obtain the result of the operation.
-1
if the request was not successful.

Error Conditions

ldap_add_ext_s() will return 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 set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_add_ext_s API.

Related Information

    ldap_add() -- Asynchronously add an entry.
    ldap_add_s() -- Synchronously add an entry.
    ldap_add_ext() -- Asynchronously add an entry with controls.
    ldap_modify_ext_s() -- Synchronously modify an entry with controls.

The ldap_add_ext_s() API support LDAP V3 server controls and client controls.


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]