16759 pcieadm bar memory type parsable output incorrect
[illumos-gate.git] / usr / src / man / man3ldap / ldap_first_entry.3ldap
blob00e6e596ae8b00bceced093a830a92f047042783
1 '\" te
2 .\" Copyright (C) 1990, Regents of the University of Michigan.  All Rights Reserved.
3 .\" Portions Copyright (C) 2002, 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_ENTRY 3LDAP "Jan 27, 2002"
8 .SH NAME
9 ldap_first_entry, ldap_next_entry, ldap_count_entries, ldap_count_references,
10 ldap_first_reference, ldap_next_reference \- LDAP entry parsing and counting
11 functions
12 .SH SYNOPSIS
13 .LP
14 .nf
15 cc[ \fIflag\fR... ] \fIfile\fR... -lldap[ \fIlibrary\fR... ]
16 #include <lber.h>
17 #include <ldap.h>
19 \fBLDAPMessage *\fR\fBldap_first_entry\fR(\fBLDAP\fR\fI*ld\fR, \fBLDAPMessage\fR \fI*result\fR);
20 .fi
22 .LP
23 .nf
24 \fBLDAPMessage *\fR\fBldap_next_entry\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*entry\fR);
25 .fi
27 .LP
28 .nf
29 \fB\fR\fBldap_count_entries\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*result\fR);
30 .fi
32 .LP
33 .nf
34 \fBLDAPMessage *\fR\fBldap_first_reference\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
35 .fi
37 .LP
38 .nf
39 \fBLDAPMessage *\fR\fBldap_next_reference\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
40 .fi
42 .LP
43 .nf
44 \fBint\fR \fBldap_count_references\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
45 .fi
47 .SH DESCRIPTION
48 .sp
49 .LP
50 These functions are used to parse results received from
51 \fBldap_result\fR(3LDAP) or the synchronous LDAP search operation functions
52 \fBldap_search_s\fR(3LDAP) and \fBldap_search_st\fR(3LDAP).
53 .sp
54 .LP
55 The \fBldap_first_entry()\fR function is used to retrieve the first entry in a
56 chain of search results.  It takes the \fIresult\fR as returned by a call to
57 \fBldap_result\fR(3LDAP) or \fBldap_search_s\fR(3LDAP) or
58 \fBldap_search_st\fR(3LDAP) and returns a pointer to the first entry in the
59 result.
60 .sp
61 .LP
62 This pointer should be supplied on a subsequent call to \fBldap_next_entry()\fR
63 to get the next entry, the result of which should be supplied to the next call
64 to \fBldap_next_entry()\fR, etc. \fBldap_next_entry()\fR will return
65 \fINULL\fR when there are no more entries.  The entries returned from these
66 calls are used in calls to the functions described in \fBldap_get_dn\fR(3LDAP),
67 \fBldap_first_attribute\fR(3LDAP), \fBldap_get_values\fR(3LDAP), etc.
68 .sp
69 .LP
70 A count of the number of entries in the search result can be obtained by
71 calling \fBldap_count_entries()\fR.
72 .sp
73 .LP
74 \fBldap_first_reference()\fR and   \fBldap_next_reference()\fR are used to step
75 through and retrieve the list of continuation references from a search result
76 chain.
77 .sp
78 .LP
79 The \fBldap_count_references()\fR function is used to count the number of
80 references that are contained in and remain in a search result chain.
81 .SH ERRORS
82 .sp
83 .LP
84 If an error occurs in \fBldap_first_entry()\fR or \fBldap_next_entry()\fR,
85 \fINULL\fR is returned and the  \fBld_errno\fR field in the \fIld\fR parameter
86 is set to indicate the error.  If an error occurs in
87 \fBldap_count_entries()\fR, \fB\(mi1\fR is returned, and \fBld_errno\fR is set
88 appropriately.  See \fBldap_error\fR(3LDAP) for a description of possible error
89 codes.
90 .SH ATTRIBUTES
91 .sp
92 .LP
93 See \fBattributes\fR(7) for a description of the following attributes:
94 .sp
96 .sp
97 .TS
98 box;
99 c | c
100 l | l .
101 ATTRIBUTE TYPE  ATTRIBUTE VALUE
102 Interface Stability     Evolving
105 .SH SEE ALSO
108 .BR ldap (3LDAP),
109 .BR ldap_first_attribute (3LDAP),
110 .BR ldap_get_dn (3LDAP),
111 .BR ldap_get_values (3LDAP),
112 .BR ldap_result (3LDAP),
113 .BR ldap_search (3LDAP),
114 .BR attributes (7)