NAME
ldapfirstentry, ldapnextentry, ldapcountentries - LDAP result
entry parsing and counting routines LLIIBBRRAARRYYOpenLDAP LDAP (libldap, -lldap)
SYNOPSIS
##iinncclluuddee <
iinntt llddaappccoouunntteennttrriieess(( LLDDAAPP **lldd,, LLDDAAPPMMeessssaaggee **rreessuulltt )) LLDDAAPPMMeessssaaggee **llddaappffiirrsstteennttrryy(( LLDDAAPP **lldd,, LLDDAAPPMMeessssaaggee **rreessuulltt )) LLDDAAPPMMeessssaaggee **llddaappnneexxtteennttrryy(( LLDDAAPP **lldd,, LLDDAAPPMMeessssaaggee **eennttrryy ))> DESCRIPTION
These routines are used to parse results received from llddaapprreessuulltt(3) or the synchronous LDAP search operation routines llddaappsseeaarrcchhss(3) and llddaappsseeaarrcchhsstt(3). The llddaappffiirrsstteennttrryy(()) routine is used to retrieve the first entry in a chain of search results. It takes the result as returned by a call to llddaapprreessuulltt(3) or llddaappsseeaarrcchhss(3) or llddaappsseeaarrcchhsstt(3) and returns a pointer to the first entry in the result. This pointer should be supplied on a subsequent call to llddaappnneexxtteennttrryy(()) to get the next entry, the result of which should be supplied to the next call to llddaappnneexxtteennttrryy(()), etc. llddaappnneexxtteennttrryy(()) will return NULL when there are no more entries. The entries returned from these calls are used in calls to the routines described in llddaappggeettddnn(3), llddaappffiirrssttaattttrriibbuuttee(3), llddaappggeettvvaalluueess(3), etc. A count of the number of entries in the search result can be obtained by calling llddaappccoouunntteennttrriieess(()). EERRRROORRSS If an error occurs in llddaappffiirrsstteennttrryy(()) or llddaappnneexxtteennttrryy(()), NULL is returned and the lderrno field in the ld parameter is set to indicatethe error. If an error occurs in llddaappccoouunntteennttrriieess(()), -1 is returned,
and llddeerrrrnnoo is set appropriately. See llddaappeerrrroorr(3) for a description of possible error codes.SEE ALSO
llddaapp(3), llddaapprreessuulltt(3), llddaappsseeaarrcchh(3), llddaappffiirrssttaattttrriibbuuttee(3), llddaappggeettvvaalluueess(3), llddaappggeettddnn(3) AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS OOppeennLLDDAAPP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OOppeennLLDDAAPP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.2.19 2004/11/26 LDAPFIRSTENTRY(3)