Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_send_ldap_search_entry()

Sends an entry found by a search back to the client.

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:

pb

Parameter block.

e

Pointer to the Slapi_Entry structure representing the entry that you want to send back to the client.

ectrls

Pointer to the array of LDAPControl structures representing the controls associated with the search request.

attrs

Attribute types specified in the LDAP search request

attrsonly

Specifies whether or not the attribute values should be sent back with the result.

  • If 0, the values are included.

  • If 1, the values are not included.

Returns

This function returns 0 if successful, 1 if the entry is not sent (for example, if access control did not allow it to be sent), or -1 if an error occurs.

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:

See Also

slapi_send_ldap_referral()

slapi_send_ldap_result()