ldap_add_control()--Create a Control and Insert it into the List of LDAP Server Controls


  Syntax
 #include <ldap.h>
 
 int ldap_add_control(
              char        *oid,
              ber_len_t   len,
              char        *value,
              int         isCritical,
              LDAPControl ***ctrlList)

  Library Name/Service Program: QSYS/QGLDCLNT

  Default Public Authority: *USE

  Threadsafe: Yes

The ldap_add_control() function is used to create a control and insert it into the list of LDAP server controls.

Note: The function will allocate space in the list for the control.


Authorities and Locks

No i5/OS authority is required. All authority checking is done by the LDAP server.


Parameters

oid
(Input) Specifies the control type, represented as a string.

len
(Input) Specifies the length of the value string.

value
(Input) Specifies the data associated with the control.

isCritical
(Input) Specifies whether the control is critical or not.

ctrlList
(Input) Specifies a list of LDAP server controls. See LDAP Controls for more information about server controls.


Return Value

LDAP_SUCCESS
if the request was successful.
LDAP_NO_MEMORY
if the control could not be added.

Related Information



API introduced: V5R3
Top | LDAP APIs | APIs by category