17.6. slapi_search_internal_callback_pb()
Performs an LDAP search operation based on a parameter block to search the directory. Unlike slapi_search_internal_pb(), this function allows you to specify callback functions that are invoked when the search operation finds matching entries or entries with referrals.
#include "slapi-plugin.h" int slapi_search_internal_callback_pb(Slapi_PBlock *pb, void *callback_data, plugin_result_callback prc, plugin_search_entry_callback psec, plugin_referral_entry_callback prec);
This function takes the following parameters:
| pb | A parameter block that has been initialized using slapi_seq_internal_callback_set_pb(). |
| callback_data | A pointer to arbitrary plug-in or operation-specific data that you would like to pass to your callback functions. |
| prc | Callback function that the server calls to send result codes. The function must have the prototype specified by plugin_result_callback. |
| psec | Callback function that the server calls when finding a matching entry in the directory. The function must have the prototype specified by plugin_search_entry_callback. |
| prec | Callback function that the server calls when finding an entry that contains LDAPv3 referrals. The function must have the prototype specified by plugin_referral_entry_callback. |
This function returns one of the following values:
- 0 if successful.
- -1 if an error occurs. If -1 is returned, the
SLAPI_PLUGIN_INTOP_RESULTfield of the parameter block should be consulted to determine the precise LDAP result code.
The entries passed to the search entry callback function do not need to be freed. If you need to access an entry after returning from the callback function, call slapi_entry_dup() to make a copy.
slapi_search_internal_callback_pb.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.