Red Hat DIRECTORY SERVER 7.1 - PLUG-IN PROGRAMMERS Manual page 42

Table of Contents

Advertisement

Writing Plug-in Initialization Functions
In some cases, you may need to send an LDAP result back to the client. For
example, if you are writing a pre-operation bind function and an error occurs
during the processing of the function, the function should return a non-zero
value, log an error message, and send the appropriate LDAP result code back to
the client. For information on the appropriate result code to return to the client,
refer to the chapter that documents the type of plug-in you are writing.
Writing Plug-in Initialization Functions
Before the Directory Server can call your plug-in function, the function must be
properly initialized. To do this, you must write an initialization function for your
server plug-in. The initialization function should do the following:
Specify the plug-in compatibility version.
1.
Register each of your plug-in functions.
2.
Return a value to the Directory Server.
3.
NOTE
Your initialization function should have a prototype similar to the following:
int my_init_function( Slapi_PBlock pb );
In the initialization function, the Directory Server passes a single argument of
type
Specifying Directory Server Compatibility
You need to specify the compatibility version of your plug-in so that the Directory
Server can determine whether it supports the plug-in.
To specify the plug-in compatibility version, call the
function, and set the
associated with the plug-in. For example:
42
Red Hat Directory Server Plug-in Programmer's Guide • May 2005
The initialization function should not do anything more than these three
steps. If you need to perform additional configuration or initialization, use
a start function. This function is specified by using slapi_pblock_set()
with the SLAPI_PLUGIN_START_FN parameter in the initialization
function.
.
Slapi_PBlock
SLAPI_PLUGIN_VERSION
slapi_pblock_set()
parameter to the version number

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents