.TH LDAP_CONTROLS 3 "RELEASEDATE" "OpenLDAP LDVERSION" .\" $OpenLDAP$ .\" Copyright 1998-2007 The OpenLDAP Foundation All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME ldap_create_control, ldap_find_control, ldap_control_free, ldap_controls_free \- LDAP control manipulation routines .SH LIBRARY OpenLDAP LDAP (libldap, -lldap) .SH SYNOPSIS .B #include .LP .BI "int ldap_create_control(LDAP_CONST char *" OID ", BerElement *" ber ", int " iscritical ", LDAPControl **" ctrlp ");" .LP .BI "LDAPControl *ldap_find_control(LDAP_CONST char *" OID ", LDAPControl **" ctrls ");" .LP .BI "void ldap_control_free(LDAPControl *" ctrl ");" .LP .BI "void ldap_controls_free(LDAPControl **" ctrls ");" .SH DESCRIPTION These routines are used to manipulate structures used for LDAP controls. .BR ldap_create_control () creates a control with the specified .I OID using the contents of the .I ber parameter for the control value, if any. The .I iscritical parameter should be non-zero for a critical control. The created control is returned in the .I ctrlp parameter. The routine returns .B LDAP_SUCCESS on success or some other error code on failure. .BR ldap_find_control () searches the .I ctrls array for a control whose OID matches the .I OID parameter. The routine returns a pointer to the control if found, NULL otherwise. .BR ldap_control_free () frees an individual control structure, and .BR ldap_controls_free () frees an array of controls. .SH SEE ALSO .BR ldap (3), .BR ldap_error (3) .SH ACKNOWLEDGEMENTS .so ../Project