LDAP_CONTROLS(3)

NAME
ldap_create_control, ldap_find_control, ldap_control_free, ldap_controls_free - LDAP control manipulation routines

LIBRARY
OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS
#include <ldap.h>

int ldap_create_control(LDAP_CONST char *OID, BerElement *ber, int iscritical, LDAPControl **ctrlp);

LDAPControl *ldap_find_control(LDAP_CONST char *OID, LDAPControl **ctrls);

void ldap_control_free(LDAPControl *ctrl);

void ldap_controls_free(LDAPControl **ctrls);

DESCRIPTION
These routines are used to manipulate structures used for LDAP controls. ldap_create_control() creates a control with the specified OID using the contents of the ber parameter for the control value, if any. The iscritical parameter should be non-zero for a critical control. The created control is returned in the ctrlp parameter. The routine returns LDAP_SUCCESS on success or some other error code on failure. ldap_find_control() searches the ctrls array for a control whose OID matches the OID parameter. The routine returns a pointer to the control if found, NULL otherwise. ldap_control_free() frees an individual control structure, and ldap_controls_free() frees an array of controls.

SEE ALSO
ldap(3), ldap_error(3)

ACKNOWLEDGEMENTS