This chapter describes the parameters available in the Slapi_PBlock parameter block, the type of data associated with each parameter, and the plug-in functions in which those parameters are accessible.
To get the values of these parameters, call the slapi_pblock_get() function. To set the values of these parameters, call the slapi_pblock_set() function. Using these parameters, you can get and set the following information:
Parameters for Registering Plug-In Functions
Parameters Accessible to All Plug-Ins
Parameters for the Configuration Function
Parameters for the Bind Function
Parameters for the Search Function
Parameters for the Add Function
Parameters for the Compare Function
Parameters for the Delete Function
Parameters for the Modify Function
Parameters for the Modify RDN Function
Parameters for the Abandon Function
Parameters for Database Import
Parameters for Database Export
Parameters for Database Archive
Parameters for Database Restore
Parameters for Database Indexing
Parameters for Extended Operations
Parameters for Internal LDAP Operations
Parameters for Matching Rule Plug-Ins
Note. With the exception of the parameters for matching rule plug-in functions, you do not need to get the value of any of these parameters.
The parameters for registering plug-in functions are organized in the following sections:
Database Plug-Ins
Pre-Operation/Data Validation Plug-Ins
Post-Operation/Data Notification Plug-Ins
Extended Operation Plug-Ins
Matching Rule Plug-Ins
The parameters listed in this section are used to register database plug-in functions.
Each parameter corresponds to an operation performed by the back-end database. When integrating your own database with the Directory Server, you need to write and register your own plug-in functions that handle these operations.
To register your plug-in function, write an initialization function that sets the values of the following parameters to your functions.
SLAPI_PLUGIN_DB_BIND_FN
SLAPI_PLUGIN_DB_UNBIND_FN
SLAPI_PLUGIN_DB_SEARCH_FN
SLAPI_PLUGIN_DB_COMPARE_FN
SLAPI_PLUGIN_DB_MODIFY_FN
SLAPI_PLUGIN_DB_MODRDN_FN
SLAPI_PLUGIN_DB_ADD_FN
SLAPI_PLUGIN_DB_DELETE_FN
SLAPI_PLUGIN_DB_ABANDON_FN
SLAPI_PLUGIN_DB_CONFIG_FN
SLAPI_PLUGIN_CLOSE_FN
SLAPI_PLUGIN_DB_FLUSH_FN
SLAPI_PLUGIN_START_FN
SLAPI_PLUGIN_DB_ENTRY_FN
SLAPI_PLUGIN_DB_REFERRAL_FN
SLAPI_PLUGIN_DB_RESULT_FN
SLAPI_PLUGIN_DB_LDIFDB_FN
SLAPI_PLUGIN_DB_DBLDIF_FN
SLAPI_PLUGIN_DB_ARCHIVEDB_FN
SLAPI_PLUGIN_DB_DBARCHIVE_FN
SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_FN
SLAPI_PLUGIN_DB_NEXT_SEARCH_ENTRY_EXT_FN
SLAPI_PLUGIN_DB_ENTRY_RELEASE_FN
SLAPI_PLUGIN_DB_SIZE_FN
SLAPI_PLUGIN_DB_TEST_FN
SLAPI_PLUGIN_DB_DB2INDEX_FN
The parameters listed in this section are used to register pre-operation/data validation plug-in functions.
SLAPI_PLUGIN_PRE_BIND_FN
SLAPI_PLUGIN_PRE_UNBIND_FN
SLAPI_PLUGIN_PRE_SEARCH_FN
SLAPI_PLUGIN_PRE_COMPARE_FN
SLAPI_PLUGIN_PRE_MODIFY_FN
SLAPI_PLUGIN_PRE_MODRDN_FN
SLAPI_PLUGIN_PRE_ADD_FN
SLAPI_PLUGIN_PRE_DELETE_FN
SLAPI_PLUGIN_PRE_ABANDON_FN
SLAPI_PLUGIN_PRE_ENTRY_FN
SLAPI_PLUGIN_PRE_REFERRAL_FN
SLAPI_PLUGIN_PRE_RESULT_FN
The parameters listed in this section are used to register post-operation/data notification plug-in functions.
SLAPI_PLUGIN_POST_BIND_FN
SLAPI_PLUGIN_POST_UNBIND_FN
SLAPI_PLUGIN_POST_SEARCH_FN
SLAPI_PLUGIN_POST_COMPARE_FN
SLAPI_PLUGIN_POST_MODIFY_FN
SLAPI_PLUGIN_POST_MODRDN_FN
SLAPI_PLUGIN_POST_ADD_FN
SLAPI_PLUGIN_POST_DELETE_FN
SLAPI_PLUGIN_POST_ABANDON_FN
SLAPI_PLUGIN_POST_ENTRY_FN
SLAPI_PLUGIN_POST_REFERRAL_FN
SLAPI_PLUGIN_POST_RESULT_FN
The parameters listed below are used to register extended operation plug-in functions.
SLAPI_PLUGIN_EXT_OP_FN
void *
SLAPI_PLUGIN_EXT_OP_OIDLIST
char **
The parameters listed in below are used to register matching rule plug-in functions.
SLAPI_PLUGIN_MR_FILTER_CREATE_FN
SLAPI_PLUGIN_MR_INDEXER_CREATE_FN
SLAPI_PLUGIN_MR_FILTER_MATCH_FN
SLAPI_PLUGIN_MR_FILTER_INDEX_FN
SLAPI_PLUGIN_MR_FILTER_RESET_FN
SLAPI_PLUGIN_MR_INDEX_FN
SLAPI_PLUGIN_DESTROY_FN
Information About the Database
Information About the Connection
Information About the Operation
Notes in the Access Log
Information About the Plug-In
The parameters listed below specify information about the back-end database. These parameters are available for all types of plug-ins. Note that these specific parameters can not be set by calling slapi_pblock_set(). You can, however, get these parameters by calling slapi_pblock_get().
SLAPI_BE_MONITORDN
char *
SLAPI_BE_TYPE
SLAPI_BE_READONLY
int
SLAPI_DBSIZE
The parameters listed below specify information about the connection. These parameters are available for all types of plug-ins.
SLAPI_CONN_ID
SLAPI_CONN_DN
SLAPI_CONN_AUTHTYPE
SLAPI_CONN_CLIENTIP
struct in_addr *
SLAPI_CONN_SERVERIP
The parameters listed below specify information about the current operation. These parameters are available for all types of plug-ins.
SLAPI_OPINITIATED_TIME
time_t
SLAPI_REQUESTOR_ISROOT
SLAPI_REQUESTOR_ISUPDATEDN
SLAPI_REQUESTOR_DN
SLAPI_TARGET_DN
SLAPI_REQCONTROLS
LDAPControl **
This feature is new in the Netscape Directory Server 4.0 release and is not available in previous releases.
The parameters listed below specify notes that can be appended to access log entries. These parameters are available for all types of plug-ins.
SLAPI_OPERATION_NOTES
unsigned int
For more information, see "Adding Notes to Access Log Entries" on page 58.
The parameters listed below specify information about the plug-in that is available to all plug-in functions defined in the current library. These parameters are available for all types of plug-ins.
SLAPI_PLUGIN_PRIVATE
SLAPI_PLUGIN_TYPE
SLAPI_PLUGIN_ARGV
SLAPI_PLUGIN_ARGC
SLAPI_PLUGIN_VERSION
SLAPI_PLUGIN_OPRETURN
Types of Plug-Ins
The SLAPI_PLUGIN_TYPE parameter can have one of the following values, which identifies the type of the current plug-in (see Table 2.1 for a more detailed description of the types of server plug-ins):
SLAPI_PLUGIN_DATABASE
SLAPI_PLUGIN_EXTENDEDOP
SLAPI_PLUGIN_PREOPERATION
SLAPI_PLUGIN_POSTOPERATION
SLAPI_PLUGIN_MATCHINGRULE
SLAPI_PLUGIN_SYNTAX
Version Information
To set the value of the SLAPI_PLUGIN_VERSION parameter, you can specify one of the following values:
SLAPI_PLUGIN_CURRENT_VERSION
SLAPI_PLUGIN_VERSION_01
SLAPI_PLUGIN_VERSION_02
SLAPI_CONFIG_FILENAME
SLAPI_CONFIG_LINENO
SLAPI_CONFIG_ARGC
SLAPI_CONFIG_ARGV
See "Reading Configuration Files" on page 104 for more information on these parameters.
SLAPI_BIND_TARGET
SLAPI_BIND_METHOD
SLAPI_BIND_CREDENTIALS
struct berval *
SLAPI_BIND_RET_SASLCREDS
SLAPI_BIND_SASLMECHANISM
See "Processing an LDAP Bind Operation" on page 105 for more information on these parameters.
SLAPI_SEARCH_TARGET
SLAPI_SEARCH_SCOPE
SLAPI_SEARCH_DEREF
SLAPI_SEARCH_SIZELIMIT
SLAPI_SEARCH_TIMELIMIT
SLAPI_SEARCH_FILTER
Slapi_Filter *
SLAPI_SEARCH_STRFILTER
SLAPI_SEARCH_ATTRS
SLAPI_SEARCH_ATTRSONLY
The following parameters are set by the front-end and back-end as part of the process of executing the search. .
SLAPI_SEARCH_RESULT_SET
SLAPI_SEARCH_RESULT_ENTRY
SLAPI_SEARCH_RESULT_ENTRY_EXT
SLAPI_NENTRIES
SLAPI_SEARCH_REFERRALS
struct berval **
See "Processing an LDAP Search Operation" on page 107 and "Iterating through Candidates" on page 110 for more information on these parameters.
SLAPI_ADD_TARGET
SLAPI_ADD_ENTRY
Slapi_Entry *
See "Processing an LDAP Add Operation" on page 112 for more information on these parameters.
SLAPI_COMPARE_TARGET
SLAPI_COMPARE_TYPE
SLAPI_COMPARE_VALUE
See "Processing an LDAP Compare Operation" on page 111 for more information on these parameters.
SLAPI_DELETE_TARGET
See "Processing an LDAP Delete Operation" on page 117 for more information on these parameters.
SLAPI_MODIFY_TARGET
SLAPI_MODIFY_MODS
LDAPMod **
See "Processing an LDAP Modify Operation" on page 113 for more information on these parameters.
SLAPI_MODRDN_TARGET
SLAPI_MODRDN_NEWRDN
SLAPI_MODRDN_DELOLDRDN
SLAPI_MODRDN_NEWSUPERIOR
See "Processing an LDAP Modify RDN Operation" on page 115 for more information on these parameters.
SLAPI_ABANDON_MSGID
unsigned long
See "Processing an LDAP Abandon Operation" on page 118 for more information on these parameters.
SLAPI_LDIF2DB_FILE
SLAPI_LDIF2DB_REMOVEDUPVALS
SLAPI_LDIF2DB_NOATTRINDEXES
SLAPI_LDIF2DB_INCLUDE
SLAPI_LDIF2DB_EXCLUDE
See "Importing an LDIF File into the Database" on page 120 for more information on these parameters.
SLAPI_DB2LDIF_PRINTKEY
SLAPI_DB2LDIF_PRINT_DSE_TREE_FN
Se e "Importing an LDIF File into the Database" on page 120 for more information on these parameters.
SLAPI_SEQ_VAL
Se e "Saving the Database as an Archive" on page 123 for more information on these parameters.
Se e "Restoring the Database from an Archive" on page 123 for more information on these parameters.
The following table lists the parameters in the parameter block passed to the database indexing function, which is responsible for generating indexes for the database. If you are writing your own plug-in function for performing this work, you can get these values by calling the slapi_pblock_get() function.
SLAPI_DB2INDEX_ATTRS
Se e "Generating Indexes for the Database" on page 124 for more information on these parameters.
SLAPI_EXT_OP_REQ_OID
SLAPI_EXT_OP_REQ_VALUE
struct berval*
SLAPI_EXT_OP_RET_OID
SLAPI_EXT_OP_RET_VALUE
SLAPI_PLUGIN_INTOP_RESULT
SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES
Slapi_Entry **
SLAPI_PLUGIN_INTOP_SEARCH_REFERRALS
The following functions set all three parameters:
slapi_search_internal()
slapi_search_internal_callback()
slapi_add_internal()
slapi_add_entry_internal()
slapi_delete_internal()
slapi_modify_internal()
slapi_modrdn_internal()
SLAPI_PLUGIN_MR_OID
SLAPI_PLUGIN_MR_TYPE
SLAPI_PLUGIN_MR_VALUE
SLAPI_PLUGIN_MR_VALUES
SLAPI_PLUGIN_MR_KEYS
SLAPI_PLUGIN_MR_FILTER_REUSABLE
SLAPI_PLUGIN_MR_QUERY_OPERATOR
The following parameters are listed in the slapi-plugin.h header file but are not currently used:
SLAPI_MR_FILTER_ENTRY
SLAPI_MR_FILTER_TYPE
SLAPI_MR_FILTER_VALUE
SLAPI_MR_FILTER_OID
SLAPI_MR_FILTER_DNATTRS