1LDAP_ADD(3)                Library Functions Manual                LDAP_ADD(3)
2
3
4

NAME

6       ldap_add_ext, ldap_add_ext_s - Perform an LDAP add operation
7

LIBRARY

9       OpenLDAP LDAP (libldap, -lldap)
10

SYNOPSIS

12       #include <ldap.h>
13
14       int ldap_add_ext(
15              LDAP *ld,
16              const char *dn,
17              LDAPMod **attrs,
18              LDAPControl **sctrls,
19              LDAPControl **cctrls,
20              int *msgidp );
21
22       int ldap_add_ext_s(
23              LDAP *ld,
24              const char *dn,
25              LDAPMod **attrs,
26              LDAPControl *sctrls,
27              LDAPControl *cctrls );
28

DESCRIPTION

30       The  ldap_add_ext_s() routine is used to perform an LDAP add operation.
31       It takes dn, the DN of the entry to add, and attrs,  a  null-terminated
32       array of the entry's attributes.  The LDAPMod structure is used to rep‐
33       resent attributes, with the mod_type and mod_values fields  being  used
34       as described under ldap_modify_ext(3), and the ldap_op field being used
35       only if you need to specify the LDAP_MOD_BVALUES option. Otherwise,  it
36       should be set to zero.
37
38       Note  that  all  entries except that specified by the last component in
39       the given DN must already  exist.   ldap_add_ext_s()  returns  an  code
40       indicating success or, in the case of failure, indicating the nature of
41       failure of the operation.  See ldap_error(3) for more details.
42
43       The ldap_add_ext() routine works just like ldap_add_ext_s(), but it  is
44       asynchronous.   It  returns the message id of the request it initiated.
45       The result of this operation can be obtained by calling ldap_result(3).
46

DEPRECATED INTERFACES

48       The ldap_add() and ldap_add_s() routines are deprecated in favor of the
49       ldap_add_ext() and ldap_add_ext_s() routines, respectively.
50
51       Deprecated  interfaces  generally  remain  in  the  library.  The macro
52       LDAP_DEPRECATED can be defined to a non-zero value (e.g., -DLDAP_DEPRE‐
53       CATED=1)  when compiling program designed to use deprecated interfaces.
54       It is recommended that developers writing new programs, or updating old
55       programs,  avoid  use  of  deprecated  interfaces.   Over  time,  it is
56       expected that documentation (and, eventually, support)  for  deprecated
57       interfaces to be eliminated.
58

SEE ALSO

60       ldap(3), ldap_error(3), ldap_modify(3)
61

ACKNOWLEDGEMENTS

63       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
64       <http://www.openldap.org/>.  OpenLDAP Software is derived from  Univer‐
65       sity of Michigan LDAP 3.3 Release.
66
67
68
69OpenLDAP 2.4.44                   2016/02/05                       LDAP_ADD(3)
Impressum