Compares attribute type and name in a given entry.
#include "slapi-plugin.h" int slapi_vattr_value_compare( Slapi_Entry *e, char *type, Slapi_Value *test_this, int *result, int flags);
This function takes the following parameters:
Entry to be compared.
Attribute type name.
Value to be tested.
0 if the compare is true, 1 if the compare is false.
Not used. You should pass 0 for this parameter.
This function returns 0 for success, in which case result contains the result of the comparison.
Otherwise, this function returns the following:
SLAPI_VIRTUALATTRS_LOOP_DETECTED (failed to evaluate a virtual attribute).
SLAPI_VIRTUAL_NOT_FOUND (type not recognized by any virtual attribute and not a real attr in entry).
ENOMEM (memory error).
There is no need to call slapi_vattr_values_free() after calling this function.