ldap_add_ext()--Perform an LDAP Add Operation with Controls
Syntax
#include <ldap.h>
int ldap_add_ext(
LDAP *ld,
const char *dn,
LDAPMod **attrs,
LDAPControl **serverctrls,
LDAPControl **clientctrls,
int *msgidp)
Library Name/Service Program: QSYS/QGLDCLNT
Default Public Authority: *USE
Threadsafe: Yes
The ldap_add_ext() function is used to perform an LDAP add
operation with controls.
Authorities and Locks
No i5/OS authority is required. All authority checking is done by the LDAP
server.
Parameters
- ld
- (Input) 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) The entry's attributes, specified using the LDAPMod structure, as
defined for ldap_modify(). The mod_type
and mod_vals fields should be filled in. The mod_op field is
ignored unless ORed with the constant LDAP_MOD_BVALUES. In
this case, the mod_op field is used to select the mod_bvalues
case of the mod_vals union.
- serverctrls
- (Input) A list of LDAP server controls. This parameter may be set
to null. See LDAP Controls for more information
about server controls.
- clientctrls
- (Input) A list of LDAP client controls. This parameter may be set
to null. See LDAP Controls for more information
about client controls.
- msgidp
- (Output) This result parameter is set to the message ID of the request if
the ldap_add_ext() call succeeds.
Return Value
- LDAP_SUCCESS
- if the request was successful. If successful,
ldap_add_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.
- another LDAP error code
- if the request was not successful.
Error Conditions
If ldap_add_ext() is not successful, an LDAP error code
will be returned. See LDAP Client API Error
Conditions for possible LDAP error code values. The error code indicates if
the operation completed successfully. The
ldap_parse_result() API is used to check the error code in the result.
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_add_ext
API. |
Related Information
The ldap_add_ext() API supports LDAP V3 server controls and
client controls.
API introduced: V4R5