]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_add.3
edebc7c132a04b3b7b8529f8c1dfd25c60901ddb
[openldap] / doc / man / man3 / ldap_add.3
1 .TH LDAP_ADD 3 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2017 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap_add_ext, ldap_add_ext_s \- Perform an LDAP add operation
7 .SH LIBRARY
8 OpenLDAP LDAP (libldap, \-lldap)
9 .SH SYNOPSIS
10 .ft B
11 #include <ldap.h>
12 .LP
13 .ft B
14 .nf
15 int ldap_add_ext(
16 .RS
17 .ft B
18 LDAP *\fIld,
19 const char *\fIdn\fB,
20 LDAPMod **\fIattrs\fB,
21 LDAPControl **\fIsctrls\fB,
22 LDAPControl **\fIcctrls\fB,
23 int *\fImsgidp\fB );
24 .RE
25 .LP
26 .ft B
27 .nf
28 int ldap_add_ext_s(
29 .RS
30 LDAP *\fIld\fB,
31 const char *\fIdn\fB,
32 LDAPMod **\fIattrs\fB,
33 LDAPControl *\fIsctrls\fB,
34 LDAPControl *\fIcctrls\fB );
35 .RE
36 .fi
37 .SH DESCRIPTION
38 The
39 .B ldap_add_ext_s()
40 routine is used to perform an LDAP add operation.
41 It takes \fIdn\fP, the DN of the entry to add, and \fIattrs\fP, a
42 null-terminated array of the entry's attributes.  The LDAPMod structure
43 is used to represent attributes, with the \fImod_type\fP and
44 \fImod_values\fP fields being used as described under
45 .BR ldap_modify_ext (3),
46 and the \fIldap_op\fP field being used only if you need to specify
47 the LDAP_MOD_BVALUES option. Otherwise, it should be set to zero.
48 .LP
49 Note that all entries except that
50 specified by the last component in the given DN must already exist.
51 .B ldap_add_ext_s()
52 returns an code indicating success or, in the case of failure,
53 indicating the nature of failure of the operation.  See
54 .BR ldap_error (3)
55 for more details.
56 .LP
57 The
58 .B ldap_add_ext()
59 routine works just like
60 .BR ldap_add_ext_s() ,
61 but it is asynchronous.  It returns the message id of the request it
62 initiated.  The result of this operation can be obtained by calling
63 .BR ldap_result (3).
64 .SH DEPRECATED INTERFACES
65 The
66 .BR ldap_add ()
67 and
68 .BR ldap_add_s ()
69 routines are deprecated in favor of the
70 .BR ldap_add_ext ()
71 and
72 .BR ldap_add_ext_s ()
73 routines, respectively.
74 .LP
75 .so Deprecated
76 .SH SEE ALSO
77 .BR ldap (3),
78 .BR ldap_error (3),
79 .BR ldap_modify (3)
80 .SH ACKNOWLEDGEMENTS
81 .so ../Project