This chapter describes the parameters available in the parameter block, Slapi_PBlock, structure. This chapter lists data types associated with each parameter.
To read parameter values, use slapi_pblock_get(). To write parameter values, use slapi_pblock_set(). Use of other functions may crash the server.
Refer to the Part I, Directory Server Plug-In API Guide and the example plug-ins under install-path/examples/ to better grasp how to use these parameters.
This chapter categorizes parameters as follows.
Table 18–1 Slapi_PBlock Parameter Categories
Category |
Accessible to… |
---|---|
All plug-in functions |
|
Pre- and post-operation add functions |
|
All plug-in functions |
|
Pre- and post-operation bind functions |
|
Pre- and post-operation compare functions |
|
All plug-in functions |
|
Pre- and post-operation delete functions |
|
All plug-in functions |
|
Extended operation functions |
|
All plug-in functions |
|
Pre- and post-operation modify functions |
|
All plug-in functions |
|
Plug-in initialization functions and specific types as mentioned in this section |
|
Password check functions and data |
|
Post-operation plug-in functions |
|
Pre- and post-operation modify RDN functions |
|
All plug-in functions |
|
Pre- and post-operation search functions |
The following parameter allows you to configure access log output.
Table 18–2 Access Log Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
unsigned int |
Flag specifying that unindexed searches be indicated in the access log. Setting this parameter to SLAPI_OP_NOTE_UNINDEXED causes the string Notes=U to be appended to access log entries reflecting unindexed searches. |
The following parameters allow you to access an entry to add to the directory through the parameter block.
Table 18–3 Add Function Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
Slapi_Entry * |
Entry to add. |
|
char * |
DN of the entry to add. |
The following parameters allow you to access information about directory backends through the parameter block.
Table 18–4 Backend Information Parameters
The following parameters allow you to access information about the bind operation through the parameter block.
Table 18–5 Bind Function Parameters
The following parameters allow you to access an entry or attribute to use in a comparison through the parameter block.
Table 18–6 Compare Function Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
char * |
DN of the entry to use in the comparison. |
|
char * |
Attribute type to use in the comparison. |
|
struct berval * |
Attribute value to use in the comparison. |
The following parameters allow you to access information about the client connection through the parameter block.
Table 18–7 Connection Information Parameters
The following parameters allow you to access an entry to delete through the parameter block.
Table 18–8 Delete Function Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
char * |
DN of the entry to delete. |
|
char * |
Non-normalized DN of the entry to delete. |
The following parameters allow you to access information about configuration of the directory instance through the parameter block.
Table 18–9 Directory Configuration Information Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
int |
Number of command-line arguments passed to the server at startup. |
|
char ** |
Array of command-line arguments passed to the server at startup. |
|
char * |
File system directory containing configuration files for the instance. |
|
char * |
Configuration file used, such as dse.ldif. |
The following parameters allow you to access information about an extended operation through the parameter block.
Table 18–10 Extended Operation Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
char * |
Object identifier (OID) of the extended operation specified in the request. |
|
struct berval * |
Value specified in the request. |
|
char * |
Object identifier (OID) to return to the client. |
|
struct berval * |
Value to send to the client. |
The following parameters allow you to access information about internal operations through the parameter block.
Table 18–11 Internal Operation Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
int |
Result code of internal operation. |
|
Slapi_Entry ** |
Array of entries found by internal search. |
|
char ** |
Array of referrals found by internal search in LDAP URL format. |
The following parameters allow you to access an entry to modify through the parameter block.
Table 18–12 Modify Function Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
LDAPMod ** |
NULL terminated array of LDAPMod structures containing modifications to perform on the target entry. |
|
char * |
DN of the entry to modify. |
|
char * |
Non-normalized DN of the entry to modify. |
The following parameters allow you to access information about the current operation through the parameter block.
Table 18–13 Operation Information Parameters
The following parameters are for use when registering plug-ins and their functions with the server and when accessing information about plug-in type and identity.
The following table lists information accessible to all types of plug-ins.
Table 18–14 Plug-In Information Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Internal server representation of the plug-in. |
|
int |
Number of arguments in the configuration entry. |
|
char * |
Array of arguments in the configuration entry. |
|
void * |
Plug-in identifier set and then required by the server when handling internal operations. You may cast this to Slapi_ComponentId. |
|
void * |
Private data you pass to your plug-in functions. You define this data structure. |
|
int |
Type of plug-in function, corresponding to the value of nsslapd-pluginType in the configuration entry for the plug-in. (Use the plug-in type values given here between parentheses in configuration entries.) |
|
char * |
Plug-in API version supported by the plug-in. |
Parameters for use with password check plug-ins follow.
Table 18–15 Password Verification Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
Slapi_Value ** |
Array of password values to check. |
|
void * |
Function called to check password values against quality criteria. For details, see What a Password Check Plug-In Must Do. |
Parameters for use with post-operation plug-ins follow. These parameters allow plug-ins to compare the state of an entry before an operation with the state of an entry after an operation.
Table 18–16 Post-Operation Entry Access Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
Slapi_Entry * |
Directory entry before the operation. |
|
Slapi_Entry * |
Directory entry after the operation. |
Parameters for registering generic plug-in functions follow. These function types may be registered by any plug-in.
Table 18–17 Generic Function Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called at server shutdown. |
|
void * |
Function called at server startup. May be called more than once. |
Parameters for registering an extendedop plug-in function and object identifier list follow.
Table 18–18 Extended Operation Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called upon request for an LDAP v3 extended operation. |
|
char ** |
NULL terminated list of object identifiers (OIDs) handled by the plug-in. |
Parameters for registering an internalpostoperation plug-in functions follow.
Table 18–19 Internal Postoperation Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called after an internal add operation completes. |
|
void * |
Function called after an internal delete operation completes. |
|
void * |
Function called after an internal modify operation completes. |
|
void * |
Function called after an internal rename (modify RDN) operation completes. |
Parameters for registering an internalpreoperation plug-in functions follow.
Table 18–20 Internal Preoperation Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called before an internal add operation is performed. |
|
void * |
Function called before an internal delete operation is performed. |
|
void * |
Function called before an internal modify operation is performed. |
|
void * |
Function called before an internal rename (modify RDN) operation is performed. |
Parameters for registering ldbmentryfetchstore plug-in functions follow.
Table 18–21 Entry Store/Fetch Function Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called upon retrieval of an entry from the backend. |
|
void * |
Function called before storing an entry through the backend. |
Parameters for registering matchingrule plug-in functions and arguments follow.
Table 18–22 Matching Rule Function and Argument Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
- |
Used to signify registration of the matching rule description with slapi_matchingrule_set(). |
|
- |
Used to signify registration of the matching rule name with slapi_matchingrule_set(). |
|
- |
Used to signify the matching rule is obsolete when registering with slapi_matchingrule_set(). |
|
- |
Used to signify registration of the matching rule object identifier with slapi_matchingrule_set(). |
|
- |
Used to signify registration of the matching rule syntax with slapi_matchingrule_set(). |
|
void * |
Function called to free memory allocated to filter object. |
|
void * |
Filter factory function. |
|
void * |
Function called to set the indexer function. |
|
void * |
Function called to check for a match. |
|
void * |
Function called to reset the match filter. |
|
unsigned int |
Whether the filter is reusable.
|
|
void * |
Index factory function. |
|
void * |
Function called to index a single entry. |
|
struct berval ** |
Array of index keys corresponding to the attribute values. |
|
char * |
Object identifier (OID) corresponding to the extensible match rule. |
|
int |
Type of operator used to check for matches. SLAPI_OP_EQUAL SLAPI_OP_GREATER SLAPI_OP_GREATER_OR_EQUAL SLAPI_OP_LESS SLAPI_OP_LESS_OR_EQUAL SLAPI_OP_SUBSTRING |
|
char * |
Matching rule filter type. |
|
unsigned int |
Whether to use the rule to index or to sort. SLAPI_PLUGIN_MR_USAGE_INDEX SLAPI_PLUGIN_MR_USAGE_SORT |
|
struct berval * |
Attribute value to match. |
|
struct berval ** |
Array of attribute values to match. |
|
void * |
Filter object for extensible match. You define this data structure to use in a matching rule plug-in. |
Parameters for registering postoperation plug-in functions follow.
Table 18–23 Postoperation Function Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called after an operation is abandoned. |
|
void * |
Function called after an add operation completes. |
|
void * |
Function called after a bind operation completes. |
|
void * |
Function called after a compare operation completes. |
|
void * |
Function called after a delete operation completes. |
|
void * |
Function called after an entry is sent to the client. |
|
void * |
Function called after a modify operation completes. |
|
void * |
Function called after an rename (modify RDN) operation completes. |
|
void * |
Function called after a referral is sent to the client. |
|
void * |
Function called after a result is sent to the client. |
|
void * |
Function called after a search operation completes. For persistent search operations, this function is called after the client interrupts the search. |
|
void * |
Function called after an unbind operation completes. |
Parameters for registering preoperation plug-in functions follow.
Table 18–24 Preoperation Function Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called before an operation is abandoned. |
|
void * |
Function called before an add operation is performed. |
|
void * |
Function called before a bind operation is performed. |
|
void * |
Function called before a compare operation is performed. |
|
void * |
Function called before an delete operation is performed. |
|
void * |
Function called before an entry is sent to the client. |
|
void * |
Function called before a modify operation is performed. |
|
void * |
Function called before an rename (modify RDN) operation is performed. |
|
void * |
Function called before a referral is sent to the client. |
|
void * |
Function called before a result is sent to the client. |
|
void * |
Function called before a search operation is performed. |
|
void * |
Function called before an unbind operation is performed. |
Parameters for registering pwdstorage and reverpwdstorage plug-in functions follow.
Table 18–25 Password Storage Function Registration Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
void * |
Function called to encode a password for comparison with a stored, encoded password. |
|
char * |
Stored, encoded user password. |
|
void * |
(reverpwdstorage plug-ins only) Function called to decode an encrypted password. |
|
void * |
Function called to encode a password for storage. |
|
char * |
Short password storage scheme name used by the server to identify the encoding scheme. |
|
char * |
User password in clear text. |
The following parameters allow you to access an entry to rename through the parameter block.
Table 18–26 Rename (Modify RDN) Function Parameters
The following parameters allow you to access results through the parameter block.
Table 18–27 Result Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
LDAPControl * |
Lets you add a control to the set of controls to send to the client. Use slapi_pblock_set() to add a control with this parameter. |
|
LDAPControl ** |
Array of controls to send to client. If you use this with slapi_pblock_set() to change the set of controls to send to the client, you must retrieve and free the existing set of controls pointed to by SLAPI_RES_CONTROLS. |
|
int |
Result code to send to client. |
|
char * |
Portion of target DN that matched when sending LDAP_NO_SUCH_OBJECT to the client. |
|
char * |
Message to send to client. |
The following parameters allow you to access search parameters through the parameter block.
Table 18–28 Search Function Parameters
Parameter ID |
Data Type |
Description |
---|---|---|
int |
Number of entries returned by the search. |
|
char ** |
Array of attribute types to return in the search results. The asterisk, *, can be used to mean all real (non-virtual) attributes. |
|
int |
Whether to return both attribute types and attribute values.
|
|
int |
Method for handling aliases. |
|
Slapi_Filter * |
Filter to be used for the search. |
|
struct berval ** |
Array of URLs to other LDAP servers to which the client is referred. |
|
void * |
Entry returned while iterating through the result set. You may cast this to Slapi_Entry. |
|
int |
Scope of the search. |
|
int |
Maximum number of entries to return in the search results. |
|
char * |
String representation of the filter to be used for the search. |
|
char * |
DN of base entry for the search. |
|
int |
Maximum number of seconds to allow for the search. |