Contains name-value pairs 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 parameters of the Slapi_PBlock structure. You can call slapi_pblock_get() to get the DN and credentials of the client requesting authentication.
For plug-in initialization functions, you can use the Slapi_PBlock structure to pass information to the server, such as the description of your plug-in and the names of your plug-in functions. You can set the value of a parameter by calling the slapi_pblock_set() function.
For example, in order to register a pre-operation bind plug-in function, you need to call slapi_pblock_set() to set the version number, description, and name of the plug-in function as the SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_DESCRIPTION, and SLAPI_PLUGIN_PRE_BIND_FN parameters.
The available parameters that you can use depends on the type of plug-in function you are writing. For information about the available parameters, see Chapter 15, "Parameter Reference."
See Also
slapi_pblock_new(), slapi_pblock_get(), slapi_pblock_set(), slapi_pblock_destroy().