(Applies only to filters of the types LDAP_FILTER_EQUALITY, LDAP_FILTER_GE, LDAP_FILTER_LE, LDAP_FILTER_APPROX ) Gets the attribute type and the value from the filter.
#include "slapi-plugin.h" int slapi_filter_get_ava( Slapi_Filter *f, char **type, struct berval **bval );
This function takes the following parameters:
Filter from which you wish to get the attribute and value.
Pointer to the attribute type of the filter.
Pointer to the address of the berval structure containing the value of the filter.
This function returns 0 if successful, or -1 if the filter is not one of the types listed above.
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:
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.
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.