1 .TH LDAP_FIRST_ATTRIBUTE 3 "25 November 1994" "U-M LDAP LDVERSION"
3 ldap_first_attribute, ldap_next_attribute \- step through LDAP entry attributes
11 char *ldap_first_attribute(ld, entry, berptr)
18 char *ldap_next_attribute(ld, entry, ber)
25 .B ldap_first_attribute()
27 .B ldap_next_attribute()
29 to step through the attributes in an LDAP entry.
30 .B ldap_first_attribute()
31 takes an \fIentry\fP as returned by
32 .BR ldap_first_entry (3)
34 .BR ldap_next_entry (3)
35 and returns a pointer to a per-connection buffer
36 containing the first attribute type in the entry. The return value
37 should be treated as if it is a pointer to a static area (i.e.,
39 it if you want to save it).
41 It also returns, in \fIberptr\fP, a pointer to a BerElement it has
42 allocated to keep track of its current position. This pointer should
43 be passed to subsequent calls to
44 .B ldap_next_attribute()
46 to effectively step through the entry's attributes. This pointer
48 .B ldap_next_attribute()
49 when there are no more attributes (that
51 .B ldap_next_attribute()
52 returns NULL). Otherwise, the caller is
53 responsible for freeing the BerElement pointed to by \fIberptr\fP when
54 it is no longer needed by calling
58 in this instance, be sure the second argument is 0.
60 The attribute names returned are suitable for inclusion in a call
62 .BR ldap_get_values (3)
63 to retrieve the attribute's values.
65 If an error occurs, NULL is returned and the ld_errno field in the
66 \fIld\fP parameter is set to indicate the error. See
68 for a description of possible error codes.
71 .B ldap_first_attribute()
72 routine mallocs memory that may need to
73 be freed by the caller via
77 .BR ldap_first_entry(3),
78 .BR ldap_get_values(3),