HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
See also LDAPMod and Slapi_Mod
14.27 Slapi_Mutex
Represents a mutually exclusive lock in the server plug-in.
Syntax
#include "slapi-plugin.h"
typedef struct slapi_mutex Slapi_Mutex;
Description Slapi_Mutex is the data type for an opaque structure that represents a mutual
exclusive lock (mutex) in the server plug-in.
The following table summarizes the front end API functions that you can call to work with
mutually exclusive locks.
Call this function:To:
“slapi_destroy_mutex()”Destroy a mutex.
“slapi_lock_mutex()”Lock a mutex.
“slapi_new_mutex()”Create a new mutex.
“slapi_unlock_mutex()”Unlock a mutes.
14.28 Slapi_Operation
Represents an operation pending from an LDAP client.
Syntax
#include "slapi-plugin.h"
typedef struct op Slapi_Operation;
Description Slapi_Operation is the data type for an opaque structure that represents an
operation pending from an LDAP client.
The following table summarizes the front end API functions that you can call to work with
mutually exclusive locks.
Call this function:To:
“slapi_op_abandoned()”Determine if the client has abandoned the current
operation.
“slapi_op_get_type()”
Get the type of a Slapi_Operation.
14.29 Slapi_PBlock
Contains name-value pairs, known as parameter blocks, that you can get or set for each LDAP
operation.
Syntax
#include "slapi-plugin.h"
typedef struct slapi_pblock Slapi_PBlock;
Description Slapi_PBlock contains name-value pairs that you can use to retrieve information
from the server and set information to be used by the server.
For most types of plug-in functions, the server passes in a Slapi_PBlock structure that typically
includes data relevant to the operation being processed. You can get the value of a parameter
by calling the slapi_pblock_get() function.
For example, when the plug-in function for an LDAP bind operation is called, the server puts
the DN and credentials in the SLAPI_BIND_TARGET and SLAPI_BIND_CREDENTIALS
14.27 Slapi_Mutex 137