Sun Java System Directory Server Enterprise Edition 6.3 Developer's Guide

send_ldap_search_entry_fn_ptr_t

Specifies a callback triggered before the server sends an entry returned by a search to the client.

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 );

Parameters

The callback takes the following parameters.

Table 15–13 send_ldap_search_entry_fn_ptr_t Parameters

Parameter 

Description 

pb

Current parameter block for the operation. 

e

Entry returned by the search. 

ectrls

Array of controls for the operation. 

attrs

Array of attribute types to return in the search results. 

attrsonly

  • 0 to return both values and types

  • 1 to return only attribute types

Description

This callback lets you modify what is returned to the client. Register the callback with the server using slapi_search_internal_callback_pb() .

Returns

The callback should return 0 if successful, -1 otherwise.