slapi_control_present()

slapi_control_present() determines whether the specified OID identifies a control that might be present in a list of controls.

Syntax
#include "slapi-plugin.h"
int slapi_control_present( LDAPControl **controls, char *oid,
					struct berval **val, int *iscritical );
Parameters
controls
The list of controls that you want to check.
oid
Refers to the OID of the control that you want to find.
val
Specifies the pointer to the berval structure that contains the value of the control (if the control is present in the list of controls).
iscritical
Specifies whether the control is critical to the operation of the server (if the control is present in the list of controls).
  • 0 means that the control is not critical to the operation.
  • 1 means that the control is critical to the operation.
Returns
A 1 is returned if the specified control is present in the list of controls, or 0 if the control is not present.