Chapter 55. Parameters for the Search Function

The following parameters are used with the search function:

55.1. Parameters Passed to the Search Function

The following table lists the parameters in the parameter block passed to the database search function. If you are writing a pre-operation, database, or post-operation search function, you can get these values by calling the function.
Parameter ID Data Type Description
SLAPI_SEARCH_TARGET char * DN of the base entry in the search operation; the starting point of the search.
SLAPI_ORIGINAL_TARGET_DN char * The original DN sent by the client (this DN is normalized by SLAPI_SEARCH_TARGET); read-only parameter.
SLAPI_SEARCH_SCOPE int The scope of the search. The scope can be one of the following values:
  • LDAP_SCOPE_BASE
  • LDAP_SCOPE_ONELEVEL
  • LDAP_SCOPE_SUBTREE
SLAPI_SEARCH_DEREF int Method for handling aliases in a search. This method can be one of the following values:
  • LDAP_DEREF_NEVER
  • LDAP_DEREF_SEARCHING
  • LDAP_DEREF_FINDING
  • LDAP_DEREF_ALWAYS
SLAPI_SEARCH_SIZELIMIT int Maximum number of entries to return in the search results.
SLAPI_SEARCH_TIMELIMIT int Maximum amount of time (in seconds) allowed for the search operation.
SLAPI_SEARCH_FILTER Slapi_Filter * Structure (an opaque data structure) representing the filter to be used in the search.
SLAPI_SEARCH_STRFILTER char * String representation of the filter to be used in the search.
SLAPI_SEARCH_ATTRS char ** Array of attribute types to be returned in the search results.
SLAPI_SEARCH_ATTRSONLY int Specifies whether the search results return attribute types only or attribute types and values. 0 means return both attributes and values; 1 means return attribute types only.