1 .TH LDAP_ADD 3 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2004 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_add, ldap_add_s, ldap_add_ext, ldap_add_ext_s \- Perform an LDAP add operation
8 OpenLDAP LDAP (libldap, -lldap)
13 .BI "int ldap_add(LDAP *" ld ", const char *" dn ", LDAPMod *" attrs "[]);"
15 .BI "int ldap_add_s(LDAP *" ld ", const char *" dn ", LDAPMod *" attrs "[]);"
17 .BI "int ldap_add_ext(LDAP *" ld ", const char *" dn ", LDAPMod *" attrs "[],"
19 .BI "LDAPControl *" sctrls "[], LDAPControl *" cctrls "[], int *" msgidp ");"
22 .BI "int ldap_add_ext_s(LDAP *" ld ", const char *" dn ", LDAPMod *" attrs "[],"
24 .BI "LDAPControl *" sctrls "[], LDAPControl *" cctrls "[]);"
30 routine is used to perform an LDAP add operation.
31 It takes \fIdn\fP, the DN of the entry to add, and \fIattrs\fP, a
32 null-terminated array of the entry's attributes. The LDAPMod structure
33 is used to represent attributes, with the \fImod_type\fP and
34 \fImod_values\fP fields being used as described under
36 and the \fIldap_op\fP field being used only if you need to specify
37 the LDAP_MOD_BVALUES option. Otherwise, it should be set to zero.
39 Note that all entries except that
40 specified by the last component in the given DN must already exist.
42 returns an LDAP error code indicating success or failure
49 routine works just like
51 but it is asynchronous. It returns the message id of the request it
52 initiated. The result of this operation can be obtained by calling
57 routine allows server and client controls to be specified to extend
58 the add request. This routine is asynchronous like
60 but its return value is an LDAP error code. It stores the message id
61 of the request in the integer pointed to
67 routine is the synchronous version of
69 It also returns an LDAP error code indicating success or failure
73 returns -1 in case of error initiating the request, and
74 will set the \fIld_errno\fP field in the \fIld\fP parameter
75 to indicate the error.
77 will return an LDAP error code
78 directly (LDAP_SUCCESS if everything went ok, some error otherwise).
82 also directly return LDAP error codes.
88 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
90 is derived from University of Michigan LDAP 3.3 Release.