8212 manpages contain obsolete references
[unleashed.git] / usr / src / man / man3ldap / ldap_first_attribute.3ldap
blob2b90dfcf10e77aead6b451bcede21d796eb85643
1 '\" te
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"
8 .SH NAME
9 ldap_first_attribute, ldap_next_attribute \- step through LDAP entry attributes
10 .SH SYNOPSIS
11 .LP
12 .nf
13 cc [ \fIflag\fR...] \fIfile\fR... -lldap[ \fIlibrary\fR...]
14 #include <lber.h>
15 #include <ldap.h>
17 \fBchar *\fR\fBldap_first_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
18      \fBBerElement **\fR\fIberptr\fR);
19 .fi
21 .LP
22 .nf
23 \fBchar *\fR\fBldap_next_attribute\fR(\fBLDAP *\fR\fIld\fR, \fBLDAPMessage *\fR\fIentry\fR,
24      \fBBerElement *\fR\fIber\fR);
25 .fi
27 .SH DESCRIPTION
28 .LP
29 The \fBldap_first_attribute()\fR function gets the value of the first attribute
30 in an entry.
31 .sp
32 .LP
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.
37 .sp
38 .LP
39 The \fBldap_next_attribute()\fR function gets the value of the next attribute
40 in an entry.
41 .sp
42 .LP
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.
46 .SH ERRORS
47 .LP
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.
51 .SH ATTRIBUTES
52 .LP
53 See \fBattributes\fR(5) for a description of the following attributes:
54 .sp
56 .sp
57 .TS
58 box;
59 c | c
60 l | l .
61 ATTRIBUTE TYPE  ATTRIBUTE VALUE
63 Interface Stability     Evolving
64 .TE
66 .SH SEE ALSO
67 .LP
68 \fBldap\fR(3LDAP), \fBldap_first_entry\fR(3LDAP), \fBldap_get_values\fR(3LDAP),
69 \fBldap_error\fR(3LDAP), \fBattributes\fR(5)
70 .SH NOTES
71 .LP
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).