Processing an LDAP Search Operation82 Netscape Directory Server Plug-In Programmer’s Guide • January 2002Your 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_SETparameter in the parameter block.The front-end then uses this function in conjunction with the “next entry” function(see “Iterating Through Candidates” on page 82) to iterate through the result set.The front-end sends each result back to the client and continues updates theSLAPI_NENTRIES parameter with the current number of entries sent back to theclient.If a result is actually a referral, the front-end sends the referral back to the clientand updates the SLAPI_SEARCH_REFERRALS parameter with the list of referralURLs.Finally, after sending the last entry to the client, the front-end sends an LDAPresult message specifying the number of entries found.Iterating Through CandidatesIn addition to the parameters specified in “Processing an LDAP Search Operation”on page 80, the “next entry” function has access to the following parameters (whichare set by the front-end and the back-end during the course of executing a searchoperation):SLAPI_SEARCH_FILTER Slapi_Filter * Slapi_Filter struct (anopaque data structure)representing the filter to be usedin the search.SLAPI_SEARCH_STRFILTER char * String representation of the filterto be used in the search.SLAPI_SEARCH_ATTRS char ** Array of attribute types to bereturned in the search results.SLAPI_SEARCH_ATTRSONLY int Specifies whether the searchresults return attribute types onlyor attribute types and values. (0means return both attributes andvalues; 1 means return attributetypes only)Parameter ID Data Type Description