ldap_next_reference

Returns a pointer to the next reference of message type, LDAP_RES_SEARCH_REFERENCE, in chain of LDAPMessage structures.

LDAP Version:v3
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  LDAPMessage *ldap_next_reference (
     LDAP          *ld,
     LDAPMessage   *ref);
  
  

Parameters

ld

(IN) Points to the handle for the LDAP session.

ref

(IN/OUT) Points to the next LDAPMessage structure in the search result chain. On the first call, this is the value returned by the ldap_first_reference function. On subsequent calls, it is the value returned by the ldap_next_reference function.

Return Values

NULL

No more references in the chain or failure

>0

Pointer to the next reference in the chain.

Remarks

If the ldap_next_reference function encounters an error, the function returns NULL and sets the LDAP_OPT_RESULT_CODE option in the LDAP session handle.

See Also

ldap_first_reference, ldap_count_references, ldap_parse_reference, ldap_search, ldap_search_ext, ldap_search_ext_s, ldap_search_s, ldap_search_st