This function determines whether the specified virtual attribute is present, and returns that attribute if available.
#include "slapi-plugin.h" int slapi_entry_vattr_find(const Slapi_Entry *e, const char *type, Slapi_Attr **a, int *buffer_flags);
This function takes the following parameters:
Entry to check for the virtual attribute.
Attribute type of the virtual attribute.
Structure to hold the virtual attribute.
Bitmask indicated whether the caller needs to free the attribute.
Returns one of the following values:
0 if the entry contains the virtual attribute specified by type.
In this case a points to the virtual attribute, and buffer_flags holds SLAPI_VIRTUALATTRS_RETURNED_COPIES meaning the structure a must be freed, or SLAPI_VIRTUALATTRS_RETURNED_POINTERS and it should not be freed.
-1 if the entry does not contain the attribute.