Returns the number of LDAPMessage structures in an LDAP result message chain that are of type LDAP_RES_SEARCH_REFERENCE.
#include <ldap.h>
int ldap_count_references (
LDAP *ld,
LDAPMessage *res);
(IN) Points to the handle for the LDAP session.
(IN) Points to the result chain returned by the ldap_result function or a synchronous search function.
This function counts from the current position of the pointer to the end of the chain.
If you pass a pointer that points to the first message structure in the chain, it counts all the references in the chain.
If you pass a pointer that points to a structure in the middle of the chain, it counts the references from that point to the end of the chain.