HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
9 Writing entry store/fetch plug-ins
This chapter describes how to write entry store and entry fetch plug-ins. You can use these types
of plug-ins to invoke functions before and after data is read from the default database.
9.1 How entry store/fetch plug-ins work
Entry store plug-in functions are called before data is written to the database. Entry fetch plug-in
functions are called after data is read from the default database. This processing is illustrated in
Figure 9-1 “How the server calls entry store and entry fetch plug-in functions”.
Figure 9-1 How the server calls entry store and entry fetch plug-in functions
9.2 Writing entry store/fetch functions
Unlike most other types of plug-in functions, a parameter block is not passed to entry store and
entry fetch plug-in functions when they are called. Instead, entry store and entry fetch plug-in
functions must have the following prototype:
void function_name( char **entry, unsigned long *len );
The function parameters are described below:
listitem
Pointer to a string specifying the entry in LDIF format; for details on this format, see
“slapi_filter_free()”.
len Pointer to the length of the entry string.
Because the text of the entry is passed in as an argument, you can modify the entry before it gets
saved to disk and modify the entry after it is read from disk.
9.1 How entry store/fetch plug-ins work 81