1 .TH LDAP_FIRST_REFERENCE 3 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2007 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap_first_reference, ldap_next_reference, ldap_count_references \- Stepping
7 through continuation references in a result chain
9 OpenLDAP LDAP (libldap, -lldap)
16 int ldap_count_references( LDAP *ld, LDAPMessage *result )
19 LDAPMessage *ldap_first_reference( LDAP *ld, LDAPMessage *result )
22 LDAPMessage *ldap_next_reference( LDAP *ld, LDAPMessage *reference )
25 These routines are used to step through the continuation references in a
26 result chain received from
28 or the synchronous LDAP search operation routines.
31 .B ldap_first_reference()
32 routine is used to retrieve the first reference message in a
33 result chain. It takes the \fIresult\fP as returned by a call to
37 .BR ldap_search_st (3)
38 and returns a pointer to the first reference message in the
41 This pointer should be supplied on a subsequent call to
42 .B ldap_next_reference()
43 to get the next reference message, the result of which should be
44 supplied to the next call to
45 .BR ldap_next_reference() ,
47 .B ldap_next_reference()
48 will return NULL when there are no more reference messages.
49 The reference messages returned from these calls are used by
50 .BR ldap_parse_reference (3)
51 to extract referrals and controls.
53 A count of the number of reference messages in the search result can be
55 .BR ldap_count_references() .
56 It can also be used to count the number of reference messages remaining
60 .B ldap_first_reference()
62 .BR ldap_next_reference() ,
63 NULL is returned. If an error occurs in
64 .BR ldap_count_references() ,
70 .BR ldap_parse_reference (3)
73 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
75 is derived from University of Michigan LDAP 3.3 Release.