HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
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:
1. Parses the request, and retrieves the new DN and the entry to be added.
2. Places pointers to the DN and the entry in the parameter block.
3. Calls any registered preoperation add functions, passing the parameter block to these
functions.
4. Calls the registered database add function (which is responsible for adding the entry to the
directory database), and passes to it the parameter block.
5. Calls any registered postoperation add functions, passing the parameter block 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 preoperation add function, you can change an entry before it is added to the
directory.
1.2.2 The Directory Server architecture
Internally, the Directory Server consists of two major subsections, the front end and the back
end.
The front end receives LDAP requests from clients and processes those requests. When processing
requests, the front end calls functions in the back end to read and write data. The front end then
sends the results back to the client.
The back end reads and writes data to the database containing the directory entries. The back
end abstracts the database from the front end. The data stored in a back end is identified by the
suffixes that the back end supports. For example, a back end that supports the
dc=example,dc=com suffix contains directory entries that end with that suffix.
The following diagram illustrates the Directory Server architecture.
24 An overview of Directory Server plug-ins