21.4. slapi_build_control_from_berval()
This function creates an LDAPControl structure based on a struct berval, an OID, and a criticality flag. The LDAPControl that is created can be used in LDAP client requests or internal operations.
#include "slapi-plugin.h" int slapi_build_control_from_berval( char *oid, struct berval *bvp,char iscritical, LDAPControl **ctrlp );
This function takes the following parameters:
|
oid
| The OID (object identifier) for the control that is to be created. |
|
bvp
| A struct berval that contains the control value. Pass NULL if the control has no value. |
|
iscritical
| The criticality flag. If non-zero, the control will be marked as critical. If 0, it will not be marked as critical. |
|
ctrlp
| Pointer that will receive the allocated LDAPControl structure. |
This function returns LDAP_SUCCESS (LDAP result code) if successful.
The contents of the bvp parameter are consumed by this function. Because of this, the caller should not free the bvp->bv_val pointer once a successful call to this function has been made.
ldap_control_free(), which is an LDAP API function; see the Mozilla LDAP SDK for C Programmer's Guide.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.