Finds the first attribute in an entry. If you want to iterate through the attributes in an entry, use this function in conjunction with the slapi_entry_next_attr() function.
#include "slapi-plugin.h" int slapi_entry_first_attr( Slapi_Entry *e, Slapi_Attr **attr );
This function takes the following parameters:
Entry from which you want to get the attribute.
Pointer to the first attribute in the entry.
Returns 0 when successful; any other value returned signals failure.
Do not free the returned attr. This is a pointer into the internal entry data structure. If you need a copy, use slapi_attr_dup() .