18.8. slapi_seq_internal_set_pb()

Description

This function sets up pblock for use by slapi_seq_internal_callback_pb() for an internal, sequential-access operation; the function sets up the parameter block contain the following data:

  • SLAPI_SEARCH_TARGET set to the search base.
  • SLAPI_ORIGINAL_TARGET_DN preserves the DN that was sent from the client (this DN is normalized as it is processed by SLAPI_SEARCH_TARGET); this value is read-only.
  • SAPI_SEQ_TYPE set to the sequential-access type (SLAPI_SEQ_FIRST, SLAPI_SEQ_NEXT, and so on.)
  • SLAPI_SEQ_ATTRNAME defines attribute value assertion relative to which access is performed.
  • SLAPI_SEQ_VAL defines attribute value assertion relative to which access is performed.
  • SLAPI_CONTROLS_ARG set to request controls, if present.
  • SLAPI_SEARCH_ATTRS set to the list of attributes to return.
  • SLAPI_SEARCH_ATTRSONLY indicates whether attribute values should be returned.
Syntax

#include "slapi-plugin.h"
void slapi_seq_internal_set_pb(Slapi_PBlock *pb, char *ibase, int type, char *attrname, char *val, 
char **attrs, int attrsonly, LDAPControl **controls, Slapi_ComponentId *plugin_identity, int operation_flags);

Parameters

This function takes the following parameters:

pb Parameter block initialized with operation parameters. The easiest way to provide required parameters is by calling slapi_seq_internal_callback_pb() function. Parameters can also be set directly.
callback_data Data passed to the callback functions.
res_callback Function called once the search is complete.
srch_callback Function called for each entry returned.
ref_callback Function called for each referral returned.