1ldap_first_entry(3LDAP)     LDAP Library Functions     ldap_first_entry(3LDAP)
2
3
4

NAME

6       ldap_first_entry,  ldap_next_entry, ldap_count_entries, ldap_count_ref‐
7       erences, ldap_first_reference, ldap_next_reference - LDAP entry parsing
8       and counting functions
9

SYNOPSIS

11       cc[ flag... ] file... -lldap[ library... ]
12       #include <lber.h>
13       #include <ldap.h>
14
15       LDAPMessage *ldap_first_entry(LDAP*ld, LDAPMessage *result);
16
17
18       LDAPMessage *ldap_next_entry(LDAP *ld, LDAPMessage *entry);
19
20
21       ldap_count_entries(LDAP *ld, LDAPMessage *result);
22
23
24       LDAPMessage *ldap_first_reference(LDAP *ld, LDAPMessage *res);
25
26
27       LDAPMessage *ldap_next_reference(LDAP *ld, LDAPMessage *res);
28
29
30       int ldap_count_references(LDAP *ld, LDAPMessage *res);
31
32

DESCRIPTION

34       These   functions   are   used   to   parse   results   received   from
35       ldap_result(3LDAP) or the synchronous LDAP search  operation  functions
36       ldap_search_s(3LDAP) and ldap_search_st(3LDAP).
37
38
39       The  ldap_first_entry() function is used to retrieve the first entry in
40       a chain of search results.  It takes the result as returned by  a  call
41       to  ldap_result(3LDAP) or ldap_search_s(3LDAP) or ldap_search_st(3LDAP)
42       and returns a pointer to the first entry in the result.
43
44
45       This  pointer  should   be   supplied   on   a   subsequent   call   to
46       ldap_next_entry()  to get the next entry, the result of which should be
47       supplied to the next call to ldap_next_entry(), etc.  ldap_next_entry()
48       will return  NULL when there are no more entries.  The entries returned
49       from these calls are used  in  calls  to  the  functions  described  in
50       ldap_get_dn(3LDAP),      ldap_first_attribute(3LDAP),     ldap_get_val‐
51       ues(3LDAP), etc.
52
53
54       A count of the number of entries in the search result can  be  obtained
55       by calling ldap_count_entries().
56
57
58       ldap_first_reference()  and    ldap_next_reference()  are  used to step
59       through and retrieve the list of continuation references from a  search
60       result chain.
61
62
63       The  ldap_count_references()  function  is  used to count the number of
64       references that are contained in and remain in a search result chain.
65

ERRORS

67       If an error occurs in ldap_first_entry() or ldap_next_entry(), NULL  is
68       returned and the  ld_errno field in the ld parameter is set to indicate
69       the error.  If an error occurs in ldap_count_entries(), −1 is returned,
70       and  ld_errno  is  set  appropriately.   See  ldap_error(3LDAP)  for  a
71       description of possible error codes.
72

ATTRIBUTES

74       See attributes(5) for a description of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       │Availability                 │SUNWcsl (32-bit)             │
82       │                             │SUNWcslx (64-bit)            │
83       │Interface Stability          │Evolving                     │
84       └─────────────────────────────┴─────────────────────────────┘
85

SEE ALSO

87       ldap(3LDAP),          ldap_result(3LDAP),           ldap_search(3LDAP),
88       ldap_first_attribute(3LDAP),                    ldap_get_values(3LDAP),
89       ldap_get_dn(3LDAP), attributes(5)
90
91
92
93SunOS 5.11                        27 Jan 2002          ldap_first_entry(3LDAP)
Impressum