#include <ldap.h>
int ldap_parse_result( LDAP *ld, LDAPMessage *res,
int *errcodep, char **matcheddnp, char **errmsgp,
char ***referralsp, LDAPControl ***serverctrlsp, int freeit);
LDAP_SUCCESS if the results were parsed successfully LDAP_NO_RESULTS_RETURNED if the specified LDAPMessage structure does not contain the result of an LDAP operation (for example, if it contains an entry, search reference, or chain of search results instead of the result of an LDAP operation). LDAP_MORE_RESULTS_TO_RETURN if the result in the LDAPMessage structure is part of a chain of results and the last result is not included. LDAP_DECODING_ERROR if an error occurred when decoding the BER-encoded message. LDAP_PARAM_ERROR if an invalid parameter was passed to the function LDAP_NO_MEMORY if memory cannot be allocated. ldap_parse_result() function parses the results of an LDAP operation (received from an LDAP server) and retrieves the following information:
errcodep) errmsgp) matcheddnp) (see "Receiving the Portion of the DN Matching an Entry" on page 73 for details) referralsp) serverctrlsp) LDAPControl structures that you can pass to subsequent API functions (such as the ldap_parse_sort_control() function).
Note that this function is not intended to be used to parse entries and search references. (Use the ldap_msgtype() function to determine the type of result contained in the LDAPMessage structure.)
ldap_first_entry() function to retrieve the entry. ldap_parse_reference() function to retrieve the reference.ldap_result().
Last Updated: 10/01/98 17:06:23