HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
If the control is present in the list of controls, specifies the pointer to the berval
structure containing the value of the control.
val
If the control is present in the list of controls, specifies whether the control is critical to
the operation of the server:
0 means that the control is not critical to the operation.
1 means that the control is critical to the operation.
iscritical
Returns This function returns one of the following values:
0 If the control is not present in the list of controls.
1 If the specified control is present in the list of controls.
Memory concerns The val output parameter is set to point into the controls array. A copy of
the control value is not made.
See also
slapi_get_supported_controls_copy()
“slapi_register_supported_control()”
21.6 slapi_dup_control()
Description Makes an allocated copy of an LDAPControl. This function duplicates the contents
of an LDAPControl structure. All fields within the LDAPControl are copied to a new, allocated
structure, and a pointer to the new structure is returned.
Syntax
#include "slapi-plugin.h"
LDAPControl * slapi_dup_control( LDAPControl *ctrl )
Parameters This function takes the following parameter:
Pointer to an LDAPControl structure whose contents are to be duplicated.ctrl
Returns This function returns one of the following values:
A pointer to an allocated LDAPControl structure if successful.
NULL if an error occurs.
Memory concerns The structure that is returned should be freed by calling
ldap_control_free(), which is an LDAP API function; see the Mozilla LDAP SDK for C
Programmer's Guide.
See also ldap_control_free()
21.7 slapi_get_supported_controls_copy()
Description This function replaces the deprecated slapi_get_supported_controls()
function from previous releases, as it was not multi thread safe. It retrieves an allocated array of
object identifiers (OIDs) representing the controls supported by the Directory Server. You can
register new controls by calling “slapi_register_supported_control()”.
When you call “slapi_register_supported_control()” to register a control, you specify the OID of
the control and the IDs of the operations that support the control. The server records this
information in two arrays; an array of control OIDs and an array of operations that support the
control. You can get copies of these arrays by calling slapi_get_supported_controls_copy().
For each OID returned in the ctrloidsp array, the corresponding array element (with the same
index) in the ctrlopsp array identifies the operations that support the control. For a list of the
possible IDs for the operations, refer to “slapi_register_supported_control()”.
Syntax
198 Functions for dealing with controls