Writing Plug-In Initialization Functions; Specifying Directory Server Compatibility - Red Hat DIRECTORY SERVER 7.1 - PLUG-IN PROGRAMMERS Manual

Table of Contents

Advertisement

Writing Plug-in Initialization Functions

This version is intended to be used for your tracking purposes only; it is not
the same as the server compatibility version number specified by the
SLAPI_PLUGIN_VERSION
Compatibility," on page 42, for details on this parameter). As you make
changes to your plug-in code, you can track the version distributed using the
number contained in the
The description of the server plug-in is contained in the data structure value
sample pre-operation plug-in
Registering Your Plug-in Functions
Whether you register your plug-in through the initialization function depends
upon the type of function you are registering.
For some plug-in types, you do not need to register the plug-in function from
within the initialization function. For example, you register entry store and entry
fetch plug-ins by specifying the function names in the
dse.ldif
For other plug-in types, such as pre-operation plug-ins and post-operation
plug-ins, the Directory Server gets the pointer to your function from a parameter
in the initialization function parameter block. In these cases, you use the
slapi_pblock_set()
The full list parameters that you can use to register your plug-in functions are
listed in "Parameters for Registering Plug-in Functions," on page 570.
For example, if you want to register
pre-operation search function, include the following code in your initialization
function:
slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_SEARCH_FN, \
SLAPI_PLUGIN_PRE_SEARCH_FN
plug-in function for the LDAP search operation.
NOTE
44
Red Hat Directory Server Plug-in Programmer's Guide • May 2005
file.
function to specify the name of your plug-in function.
(void *) searchdn_preop_search )
If you do not register your plug-in functions, the Directory Server
will not call your plug-in functions. Make sure to register your
plug-in functions.
parameter (see "Specifying Directory Server
structure.
Slapi_PluginDesc
.
searchdn_preop_search()
is the parameter that specifies the pre-operation
directive in the
plugin
as a

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents