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

For plug-in
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
slapi-plugin.h
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,
passing 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
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.
38
Netscape Directory Server Plug-in Programmer's Guide • October 2004
header file. You must include this header file in the plug-ins you
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
operation will contain the target DN
add
, for

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netscape directory server 7.0

Table of Contents