'\" te .\" Copyright (c) 1990, Regents of the University of Michigan. All Rights Reserved. .\" Portions Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. .TH ldap_first_attribute 3LDAP "23 Aug 2011" "SunOS 5.11" "LDAP Library Functions" .SH NAME ldap_first_attribute, ldap_next_attribute \- step through LDAP entry attributes .SH SYNOPSIS .LP .nf cc [ \fIflag\fR...] \fIfile\fR... -lldap[ \fIlibrary\fR...] #include #include \fBchar *\fR\fBldap_first_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR, \fBBerElement **\fR\fIberptr\fR); .fi .LP .nf \fBchar *\fR\fBldap_next_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR, \fBBerElement *\fR\fIber\fR); .fi .SH DESCRIPTION .sp .LP The \fBldap_first_attribute()\fR function gets the value of the first attribute in an entry. .sp .LP The \fBldap_first_attribute()\fR function returns the name of the first attribute in the entry. To get the value of the first attribute, pass the attribute name to the \fBldap_get_values()\fR function or to the \fBldap_get_values_len()\fR function. .sp .LP The \fBldap_next_attribute()\fR function gets the value of the next attribute in an entry. .sp .LP After stepping through the attributes, the application should call \fBber_free()\fR to free the \fBBerElement\fR structure allocated by the \fBldap_first_attribute()\fR function if the structure is other than NULL. .SH ERRORS .sp .LP If an error occurs, \fINULL\fR is returned and the \fBld_errno\fR field in the \fIld\fR parameter is set to indicate the error. See \fBldap_error\fR(3LDAP) for a description of possible error codes. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for a description of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/library _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBldap\fR(3LDAP), \fBldap_first_entry\fR(3LDAP), \fBldap_get_values\fR(3LDAP), \fBldap_error\fR(3LDAP), \fBattributes\fR(5) .SH NOTES .sp .LP The \fBldap_first_attribute()\fR function alllocates memory that might need to be freed by the caller by means of \fBber_free\fR(3LDAP).