2 .\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
3 .\" Portions Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH LDAP_FIRST_ATTRIBUTE 3LDAP "May 13, 2017"
9 ldap_first_attribute, ldap_next_attribute \- step through LDAP entry attributes
13 cc [ \fIflag\fR...] \fIfile\fR... -lldap[ \fIlibrary\fR...]
17 \fBchar *\fR\fBldap_first_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
18 \fBBerElement **\fR\fIberptr\fR);
23 \fBchar *\fR\fBldap_next_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
24 \fBBerElement *\fR\fIber\fR);
29 The \fBldap_first_attribute()\fR function gets the value of the first attribute
33 The \fBldap_first_attribute()\fR function returns the name of the first
34 attribute in the entry. To get the value of the first attribute, pass the
35 attribute name to the \fBldap_get_values()\fR function or to the
36 \fBldap_get_values_len()\fR function.
39 The \fBldap_next_attribute()\fR function gets the value of the next attribute
43 After stepping through the attributes, the application should call
44 \fBber_free()\fR to free the \fBBerElement\fR structure allocated by the
45 \fBldap_first_attribute()\fR function if the structure is other than NULL.
48 If an error occurs, \fINULL\fR is returned and the \fBld_errno\fR field in the
49 \fIld\fR parameter is set to indicate the error. See \fBldap_error\fR(3LDAP)
50 for a description of possible error codes.
53 See \fBattributes\fR(5) for a description of the following attributes:
61 ATTRIBUTE TYPE ATTRIBUTE VALUE
63 Interface Stability Evolving
68 \fBldap\fR(3LDAP), \fBldap_first_entry\fR(3LDAP), \fBldap_get_values\fR(3LDAP),
69 \fBldap_error\fR(3LDAP), \fBattributes\fR(5)
72 The \fBldap_first_attribute()\fR function alllocates memory that might need to
73 be freed by the caller by means of \fBber_free\fR(3LDAP).