14.6. plugin_referral_entry_callback

This typedef is used for LDAP referral entry callback functions, which are plugin-defined functions that process LDAP references generated by some internal searches.
Syntax

 

#include "slapi-plugin.h" 
typedef int (*plugin_referral_entry_callback) 
 (char *referral, void *callback_data);
Parameters

The function takes the following parameters:

Table 14.7. plugin_referral_entry_callback Parameter Listing

Parameter Description
referral The URL of a reference that is returned in response to an internal search call.
callback_data This value matches the callback_data pointer that was passed to the original internal operation function.
Returns

The following table lists this function's possible return values.

Table 14.8. plugin_referral_entry_callback Return Values

Return Value Description
0 Success
-1 An error occurred.
Description

A function that matches this typedef can be passed as the prec parameter of slapi_search_internal_callback_pb(), or as the ref_callback parameter of the slapi_seq_internal_callback_pb() function.

The LDAP referral entry callback function is called once for each referral entry found by a search operation, which means it could be called zero or any number of times.
The callback_data parameter can be used to pass arbitrary plug-in or operation-specific information to a referral entry callback function.