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 pre-operation plug-in. If you are using the post-operation 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.