HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
switch( deref ) {
case LDAP_DEREF_NEVER:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF"
,"LDAP_DEREF_NEVER\n" );
break;
case LDAP_DEREF_SEARCHING:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF"
,"LDAP_DEREF_SEARCHING\n" );
break;
case LDAP_DEREF_FINDING:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF"
,"LDAP_DEREF_FINDING\n" );
break;
case LDAP_DEREF_ALWAYS:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF"
,"LDAP_DEREF_ALWAYS\n" );
break;
default:
slapi_log_error( SLAPI_LOG_PLUGIN, "SLAPI_SEARCH_DEREF" ,"unknown
value specified: %d\n" , deref );
break;
}
4.2 Compiling the plug-in example
Use the following Makefile to compile the example. This sample Makefile assumes that the source
file is srchxmpl.c and that you are compiling a plug-in named srchxmpl.so.
NOTE:
This example uses the +DD64 compiler option because HP-UX Directory Server is a 64-bit
application. Any plug-ins that you load into HP-UX Directory Server must be built in 64-bit
mode.
Example Makefile
# Makefile for Directory Server plug-in examples
#
CFLAGS=-I/opt/dirsrv/devel/include -D_HPUX_SOURCE -Ae +z +DD64
LDFLAGS = +k -b +s $(EXTRA_LIBS)
OBJS = srchxmpl.o
all: srchxmpl.so
srchxmpl.so: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c $<
clean:
-rm -f $(OBJS) srchxmpl.so
4.3 Registering the plug-in
To register this example plug-in, you need to:
1. Create an LDIF configuration file in an ASCII text editor. See “Creating a plug-in configuration
file”.
2. Load the plug-in configuration file. See “Loading the plug-in configuration file”.
4.2 Compiling the plug-in example 45