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"
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
15 cc[ \fIflag\fR... ] \fIfile\fR... -lldap[ \fIlibrary\fR... ]
19 \fBLDAPMessage *\fR\fBldap_first_entry\fR(\fBLDAP\fR\fI*ld\fR, \fBLDAPMessage\fR \fI*result\fR);
24 \fBLDAPMessage *\fR\fBldap_next_entry\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*entry\fR);
29 \fB\fR\fBldap_count_entries\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*result\fR);
34 \fBLDAPMessage *\fR\fBldap_first_reference\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
39 \fBLDAPMessage *\fR\fBldap_next_reference\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
44 \fBint\fR \fBldap_count_references\fR(\fBLDAP\fR \fI*ld\fR, \fBLDAPMessage\fR \fI*res\fR);
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).
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
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.
70 A count of the number of entries in the search result can be obtained by
71 calling \fBldap_count_entries()\fR.
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
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.
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
93 See \fBattributes\fR(7) for a description of the following attributes:
101 ATTRIBUTE TYPE ATTRIBUTE VALUE
102 Interface Stability Evolving
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),