]> git.sur5r.net Git - openldap/blob - doc/man/man3/ldap_controls.3
ITS#2240 ldap_controls_free and friends
[openldap] / doc / man / man3 / ldap_controls.3
1 .TH LDAP_CONTROLS 3 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2007 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap_create_control, ldap_find_control, ldap_control_free, ldap_controls_free \- LDAP control manipulation routines
7 .SH LIBRARY
8 OpenLDAP LDAP (libldap, -lldap)
9 .SH SYNOPSIS
10 .B #include <ldap.h>
11 .LP
12 .BI "int ldap_create_control(LDAP_CONST char *" OID ", BerElement *" ber ", int " iscritical ", LDAPControl **" ctrlp ");"
13 .LP
14 .BI "LDAPControl *ldap_find_control(LDAP_CONST char *" OID ", LDAPControl **" ctrls ");"
15 .LP
16 .BI "void ldap_control_free(LDAPControl *" ctrl ");"
17 .LP
18 .BI "void ldap_controls_free(LDAPControl **" ctrls ");"
19 .SH DESCRIPTION
20 These routines are used to manipulate structures used for LDAP controls.
21 .BR ldap_create_control ()
22 creates a control with the specified
23 .I OID
24 using the contents of the
25 .I ber
26 parameter for the control value, if any. The
27 .I iscritical
28 parameter should be non-zero for a critical control. The created control
29 is returned in the
30 .I ctrlp
31 parameter. The routine returns
32 .B LDAP_SUCCESS
33 on success or some other error code on failure.
34 .BR ldap_find_control ()
35 searches the
36 .I ctrls
37 array for a control whose OID matches the
38 .I OID
39 parameter. The routine returns a pointer to the control if found,
40 NULL otherwise.
41 .BR ldap_control_free ()
42 frees an individual control structure, and
43 .BR ldap_controls_free ()
44 frees an array of controls.
45 .SH SEE ALSO
46 .BR ldap (3),
47 .BR ldap_error (3)
48 .SH ACKNOWLEDGEMENTS
49 .so ../Project