LDAP Library Functions ldapfirstentry(3LDAP)
NAME
ldapfirstentry, ldapnextentry, ldapcountentries,
ldapcountreferences, ldapfirstreference,
ldapnextreference - LDAP entry parsing and counting func-
tions
SYNOPSIS
cc[ flag... ] file... -lldap[ library... ]
#include
#include
LDAPMessage *ldapfirstentry(LDAP*ld, LDAPMessage *result);
LDAPMessage *ldapnextentry(LDAP *ld, LDAPMessage *entry);
ldapcountentries(LDAP *ld, LDAPMessage *result);
LDAPMessage *ldapfirstreference(LDAP *ld, LDAPMessage *res);
LDAPMessage *ldapnextreference(LDAP *ld, LDAPMessage *res);
int ldapcountreferences(LDAP *ld, LDAPMessage *res);
DESCRIPTION
These functions are used to parse results received from
ldapresult(3LDAP) or the synchronous LDAP search operation
functions ldapsearchs(3LDAP) and ldapsearchst(3LDAP).
The ldapfirstentry() function is used to retrieve the
first entry in a chain of search results. It takes the
result as returned by a call to ldapresult(3LDAP) or
ldapsearchs(3LDAP) or ldapsearchst(3LDAP) and returns a
pointer to the first entry in the result.
This pointer should be supplied on a subsequent call to
ldapnextentry() to get the next entry, the result of which
should be supplied to the next call to ldapnextentry(),
etc. ldapnextentry() will return NUL when there are no
more entries. The entries returned from these calls are
used in calls to the functions described in
ldapgetdn(3LDAP), ldapfirstattribute(3LDAP),
ldapgetvalues(3LDAP), etc.
SunOS 5.11 Last change: 27 Jan 2002 1
LDAP Library Functions ldapfirstentry(3LDAP)
A count of the number of entries in the search result can be
obtained by calling ldapcountentries().
ldapfirstreference() and ldapnextreference() are used
to step through and retrieve the list of continuation refer-
ences from a search result chain.
The ldapcountreferences() function is used to count the
number of references that are contained in and remain in a
search result chain.
ERORS
If an error occurs in ldapfirstentry() or
ldapnextentry(), NUL is returned and the lderrno field
in the ld parameter is set to indicate the error. If an
error occurs in ldapcountentries(), -1 is returned, and
lderrno is set appropriately. See ldaperror(3LDAP) for a
description of possible error codes.
ATRIBUTES
See attributes(5) for a description of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsl (32-bit)
SUNWcslx (64-bit)
Interface Stability Evolving
SEE ALSO
ldap(3LDAP), ldapresult(3LDAP), ldapsearch(3LDAP),
ldapfirstattribute(3LDAP), ldapgetvalues(3LDAP),
ldapgetdn(3LDAP), attributes(5)
SunOS 5.11 Last change: 27 Jan 2002 2
|