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

NAME

6       ldap_first_message,  ldap_count_messages,  ldap_next_message, ldap_msg‐
7       type - LDAP message processing functions
8

SYNOPSIS

10       cc[ flag... ] file... -lldap[ library... ]
11       #include <lber.h>
12       #include <ldap.h>
13
14       int ldap_count_messages(LDAP *ld, LDAPMessage *res);
15
16
17       LDAPMessage *ldap_first_message(LDAP *ld, LDAPMessage *res);
18
19
20       LDAPMessage *ldap_next_message(LDAP *ld, LDAPMessage *msg);
21
22
23       int ldap_msgtype(LDAPMessage *res);
24
25

DESCRIPTION

27       ldap_count_messages() is used to count  the  number  of  messages  that
28       remain  in a chain of results if called with a  message, entry, or ref‐
29       erence   returned   by    ldap_first_message(),    ldap_next_message(),
30       ldap_first_entry(),   ldap_next_entry(),   ldap_first_reference(),  and
31       ldap_next_reference()
32
33
34       ldap_first_message() and   ldap_next_message() functions  are  used  to
35       step  through  the  list  of  messages  in  a  result chain returned by
36       ldap_result().
37
38
39       ldap_msgtype() function returns the type of an LDAP message.
40

RETURN VALUES

42       ldap_first_message()  and   ldap_next_message()  return     LDAPMessage
43       which  can  include  referral  messages, entry messages and result mes‐
44       sages.
45
46
47       ldap_count_messages() returns the number of  messages  contained  in  a
48       chain of results.
49

ERRORS

51       ldap_first_message() and  ldap_next_message() return  NULL when no more
52       messages exist.  NULL is also returned if an error occurs while   step‐
53       ping  through  the  entries,  in which case the error parameters in the
54       session handle  ld will be set to indicate the error.
55

ATTRIBUTES

57       See attributes(5) for a description of the following attributes:
58
59
60
61
62       ┌─────────────────────────────┬─────────────────────────────┐
63       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
64       │Availability                 │SUNWcsl (32-bit)             │
65       │                             │SUNWcslx (64-bit)            │
66       │Interface Stability          │Evolving                     │
67       └─────────────────────────────┴─────────────────────────────┘
68

SEE ALSO

70       ldap_error(3LDAP), ldap_result(3LDAP), attributes(5)
71
72
73
74SunOS 5.11                        27 Jan 2002        ldap_first_message(3LDAP)
Impressum