HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
26.6 slapi_filter_get_ava()
Gets the attribute type and the value from the filter.
Description Filters of the type LDAP_FILTER_EQUALITY, LDAP_FILTER_GE,
LDAP_FILTER_LE, and LDAP_FILTER_APPROX generally compare a value against an attribute.
For example:
(cn=Barbara Jensen)
This filter finds entries in which the value of the cn attribute is equal to Barbara Jensen.
The attribute type is returned in the parameter type, and the value is returned in the parameter
bval.
Syntax
#include "slapi-plugin.h"
int slapi_filter_get_ava( Slapi_Filter *f, char **type,
struct berval **bval );
Parameters This function takes the following parameters:
Filter from which you want to get the attribute and value.
f
Pointer to the attribute type of the filter.
type
Pointer to the address of the berval structure containing the value of the filter.bval
Returns This function returns one of the following values:
0 if successful.
-1 if the filter is not one of the types listed above.
Memory concerns The strings within the parameters type and bval are direct pointers to
memory inside the Slapi_Filter and therefore should not be freed after usage. They will be
freed when a server entity calls slapi_filter_free() after usage of the Slapi_Filter
structure.
See also
“slapi_filter_get_choice()”
“slapi_filter_get_type()”
“slapi_filter_get_attribute_type()”
26.7 slapi_filter_get_choice()
Gets the type of the specified filter; for example, LDAP_FILTER_EQUALITY.
Syntax
#include "slapi-plugin.h"
int slapi_filter_get_choice( Slapi_Filter *f );
Parameters This function takes the following parameters:
Filter of which you want to get type.
f
238 Functions for dealing with filters