HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
If the base DN is not a DSE, the front end finds the back end that services the suffix specified in
the base DN. The front end then passes the search criteria to the search function for that back
end.
The front end makes this information available to preoperation and postoperation plug-in
functions in the form of parameters in a parameter block.
Table 7-2 Information available during an LDAP search operation
DescriptionData typeParameter ID
DN of the base entry in the search operation (the
starting point of the search).
char *SLAPI_SEARCH_TARGET
The original DN sent by the client (this DN is
normalized by SLAPI_SEARCH_TARGET);
read-only parameter.
char *SLAPI_ORIGINAL_TARGET_DN
The scope of the search. The scope can be one of
the following values:
LDAP_SCOPE_BASE
LDAP_SCOPE_ONELEVEL
LDAP_SCOPE_SUBTREE
intSLAPI_SEARCH_SCOPE
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
intSLAPI_SEARCH_DEREF
Maximum number of entries to return in the search
results.
intSLAPI_SEARCH_SIZELIMIT
Maximum amount of time (in seconds) allowed
for the search operation.
intSLAPI_SEARCH_TIMELIMIT
Slapi_Filter struct (an opaque data structure)
representing the filter to be used in the search.
Slapi_Filter *SLAPI_SEARCH_FILTER
String representation of the filter to be used in the
search.
char *SLAPI_SEARCH_STRFILTER
Array of attribute types to be returned in the search
results.
char **SLAPI_SEARCH_ATTRS
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).
intSLAPI_SEARCH_ATTRSONLY
Your search function should return 0 if successful. Call the “slapi_pblock_set()” function to assign
the set of search results to the SLAPI_SEARCH_RESULT_SET parameter in the parameter block.
The front end then uses this function in conjunction with the next entry function (refer to
“Iterating through candidates”) to iterate through the result set. The front end sends each result
back to the client and continues updates the SLAPI_NENTRIES parameter with the current
number of entries sent back to the client.
If a result is actually a referral, the front end sends the referral back to the client and updates the
SLAPI_SEARCH_REFERRALS parameter with the list of referral URLs.
Finally, after sending the last entry to the client, the front end sends an LDAP result message
specifying the number of entries found.
7.4 Processing an LDAP search operation 63