Finds the next attribute after prevattr in an entry. To iterate through the attributes in an entry, use this function in conjunction with the slapi_entry_first_attr() function.
#include "slapi-plugin.h" int slapi_entry_next_attr( Slapi_Entry *e, Slapi_Attr *prevattr, Slapi_Attr **attr );
This function takes the following parameters:
Entry from which you want to get the attribute.
Previous attribute in the entry.
Pointer to the next attribute after prevattr in the entry.
This function returns 0 if successful or -1 if prevattr was the last attribute in the entry.
Never free the returned attr. Use slapi_attr_dup() to make a copy if a copy is needed.