HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
When sending back the result code for an LDAP search operation, use this
argument to specify the number of matching entries found.
nentries
When sending back an LDAP_PARTIAL_RESULTS result code to an LDAPv2
client or an LDAP_REFERRAL result code to an LDAPv3 client, use this
argument to specify the array of berval structures containing the referral
URLs.
urls
Description The slapi_send_ldap_result() function is responsible for sending LDAP
result codes back to the client. You can replace the function that sends LDAP result codes to the
client with your own function. To do this:
1. Write a function with the prototype specified by send_ldap_result_fn_ptr_t.
2. In your plug-in initialization function, register your function for sending results to the client
by setting the SLAPI_PLUGIN_PRE_RESULT_FN or SLAPI_PLUGIN_POST_RESULT_FN
parameter, depending on the type of plug-in and if it is a preoperation or postoperation,
respectively, in the parameter block to the name of your function.
See also See “slapi_send_ldap_result()” for information on the default function that sends
LDAP result codes to clients.
14.11 send_ldap_search_entry_fn_ptr_t
send_ldap_result_fn_ptr_t specifies the prototype for a callback function that you can
write to send search results (entries found by a search) back to the client. You can register your
function so that it is called whenever the slapi_send_ldap_search_entry() function is
called.
Syntax
#include "slapi-plugin.h"
typedef int (*send_ldap_search_entry_fn_ptr_t)
( Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **ectrls, char **attrs,
int attrsonly );
Description The slapi_send_ldap_search_entry() function is responsible for sending
entries found by a search back to the client. You can replace the function that sends entries to
the client with your own function. To do this:
1. Write a function with the prototype specified by send_ldap_search_entry_fn_ptr_t.
2. In your plug-in initialization function, register your function by setting the
SLAPI_PLUGIN_PRE_ENTRY_FN parameter in the parameter block to the name of your
function if you are using the preoperation plug-in. If you are using the postoperation plug-in,
register your function by setting the SLAPI_PLUGIN_POST_ENTRY_FN parameter in the
parameter block to the name of your function.
See also See “slapi_send_ldap_search_entry()” for information on the default function that
sends entries to clients.
14.12 Slapi_Attr
Represents an attribute in an entry.
Syntax
#include "slapi-plugin.h"
typedef struct slapi_attr Slapi_Attr;
Description Slapi_Attr is the data type for an opaque structure that represents an attribute
in a directory entry. In certain cases, your server plug-in may need to work with an entry's
124 Data type and structure reference