HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Error message that you want sent back to the client. Pass NULL if you do not want an
error message sent back.
text
When sending back the result code for an LDAP search operation, use this argument
to specify the number of matching entries found.
nentries
When sending back an LDAP_PARTIAL_RESULTS result code to an LDAPv2 client or
an LDAP_REFERRAL result code to an LDAPv3 client, use this argument to specify the
array of berval structures containing the referral URLs. Pass NULL in other situations.
urls
See also
“slapi_str2filter()”
“slapi_send_ldap_search_entry()”
40.3 slapi_send_ldap_search_entry()
Description Call slapi_send_ldap_search_entry() to send an entry found by a search
back to the client.
attrs is the array of attribute types that you want to send from the entry. This value is equivalent
to the SLAPI_SEARCH_ATTRS parameter in the parameter block.
attrsonly specifies whether you want to send only the attribute types or the attribute types
and their values:
Pass 0 for this parameter if you want to send both the attribute types and values to the client.
Pass 1 for this parameter if you want to send only the attribute types (not the attribute
values) to the client.
This value is equivalent to the SLAPI_SEARCH_ATTRSONLY parameter in the parameter block.
If you want to define your own function for sending entries, write a function that complies with
the type definition send_ldap_search_entry_fn_ptr_t, and set the SLAPI_PLUGIN_DB_ENTRY_FN
parameter in the parameter block to the name of your function.
Syntax
#include "slapi-plugin.h"
int slapi_send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e,
LDAPControl **ectrls, char **attrs, int attrsonly );
Parameters This function takes the following parameters:
Parameter block.
pb
Pointer to the “Slapi_Entry” structure representing the entry that you want to send
back to the client.
e
Pointer to the array of LDAPControl structures representing the control associated
with the search request.
ectrls
Attribute types specified in the LDAP search request
attrs
Specifies whether the attribute values should be sent back with the result.
If 0, the values are included.
If 1, the values are not included.
attrsonly
Returns This function returns one of the following values:
0 if successful.
1 if the entry is not sent; for example, if access control did not allow it to be sent.
-1 if an error occurs.
See also
40.3 slapi_send_ldap_search_entry() 325