Calling Directory Server Plug-In Functions; The Directory Server Architecture - Netscape DIRECTORY SERVER 6.02 - PLUG-IN Manual

Table of Contents

Advertisement

Calling Directory Server Plug-In Functions

At specific LDAP events, the Directory Server calls all plug-in functions that are
registered for that event. For example, before performing an LDAP add operation
(an add event), the server calls all plug-in functions registered as pre-operation add
functions. When the add operation is completed, the server will call all registered
post-operation add functions.
In most plug-in function calls, the server passes a parameter block to the function.
The parameter block contains data relevant to the operation. In most Directory
Server plug-in functions you write, you access and modify the data in the
parameter block.
For example, when the Directory Server receives an LDAP add request, the server
does the following:
Parses the request and retrieves the new DN and the entry to be added.
1.
Places pointers to the DN and the entry in the parameter block.
2.
Calls any registered pre-operation add functions, passing the parameter block
3.
to these functions.
Calls the registered database add function (which is responsible for adding the
4.
entry to the directory database), and passes to it the parameter block.
Calls any registered post-operation add functions, passing the parameter block
5.
to these functions.
If you are writing a function that is invoked before an LDAP operation is
performed, you can prevent the operation from being performed. For example, you
can write a function that validates data before a new entry is added to the
directory. If the data is not valid, you can prevent the LDAP add operation from
occurring and return an error message to the LDAP client.
In some situations, you can also set the data that is used by the server to perform an
operation. For example, in a pre-operation add function, you can change an entry
before it is added to the directory.

The Directory Server Architecture

Internally, the Directory Server consists of two major subsections: The front-end
and the back-end.
How Directory Server Plug-Ins Work
Chapter 1
An Overview of Directory Server Plug-Ins
21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.02

Table of Contents