26.6. slapi_filter_get_ava()
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)
cn attribute is equal to Barbara Jensen.
type is returned in the parameter type, and the value is returned in the parameter bval.
#include "slapi-plugin.h" int slapi_filter_get_ava( Slapi_Filter *f, char **type, struct berval **bval );
This function takes the following parameters:
|
f
| Filter from which you want to get the attribute and value. |
|
type
| Pointer to the attribute type of the filter. |
|
bval
| Pointer to the address of the berval structure containing the value of the filter. |
This function returns one of the following values:
- 0 if successful.
- -1 if the filter is not one of the types listed above.
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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.