Returns a pointer to the first reference of message type, LDAP_RES_SEARCH_REFERENCE, in a search result chain.
#include <ldap.h>
LDAPMessage *ldap_first_reference (
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.
If the ldap_first_reference function encounters an error, the function returns NULL and sets the LDAP_OPT_RESULT_CODE option in the LDAP session handle.