Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_entry_next_attr()

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.

Syntax

#include "slapi-plugin.h"
int slapi_entry_next_attr( Slapi_Entry *e, Slapi_Attr *prevattr,
    Slapi_Attr **attr );

Parameters

This function takes the following parameters:

e

Entry from which you want to get the attribute.

prevattr

Previous attribute in the entry.

attr

Pointer to the next attribute after prevattr in the entry.

Returns

This function returns 0 if successful or -1 if prevattr was the last attribute in the entry.

Memory Concerns

Never free the returned attr. Use slapi_attr_dup() to make a copy if a copy is needed.

See Also

slapi_attr_dup()