Including The Api Header File; Passing Data With Parameter Blocks - Netscape DIRECTORY SERVER 6.2 - PLUG-IN Manual

Table of Contents

Advertisement

Writing a Plug-In Function
Chapter 10, "Writing Extended Operation Plug-Ins"

Including the API Header File

The interface to the Directory Server plug-in API is located in the
header file. You must include this header file in the plug-ins you write. The
following line of code shows an example of including this header file:
#include "slapi-plugin.h"
When you install the Directory Server,
following directory:
<server_root>/plugins/slapd/slapi/include

Passing Data with Parameter Blocks

Often, plug-in functions make use of a parameter block,
information to and from the Directory Server. The following plug-in function types
pass a parameter block as a function argument:
Pre-operation plug-in functions
Post-operation plug-in functions
Matching rule functions for indexing
Factory functions for matching rule index functions
Factory functions for matching rule filter functions
When invoking these types of plug-in functions, you pass to the Directory Server a
single argument of type
values needed to complete the function request. Your plug-in function should have
a prototype similar to the following:
int myFunction( Slapi_PBlock pb );
In this prototype,
pertaining to the operation or function.
For example, the parameter block for an add operation will contain the target DN
and the entry to be added; the parameter block for a bind operation will contain the
DN of the user, the authentication method, and the user's credentials.
28
Netscape Directory Server Plug-In Programmer's Guide • December 2003
Slapi_PBlock
is the parameter block that contains the parameters
pb
gets installed into the
slapi-plugin.h
Slapi_PBlock
. This argument contains the parameter
slapi-plugin.h
, for passing

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.2

Table of Contents