Sun Directory Server Enterprise Edition 7.0 Developer's Guide

slapi_entry_first_attr()

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.

Syntax

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

Parameters

This function takes the following parameters:

e

Entry from which you want to get the attribute.

attr

Pointer to the first attribute in the entry.

Returns

Returns 0 when successful; any other value returned signals failure.

Memory Concerns

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() .

See Also

slapi_attr_dup()