ldap_parse_extended_result

Retrieves data from an LDAPMessage that contains data from an extended operation.

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>
  
  int ldap_parse_extended_result (
     LDAP             *ld,
     LDAPMessage      *res,
     char            **retoidp,
     struct berval   **retdatap,
     int               freeit);
  
  

Parameters

ld

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

res

(IN) Points to an LDAPMessage containing the results of an LDAP extended operation.

retoidp

(OUT) Points to the dotted-OID text string that represents the name of the extended operation. Pass in NULL to ignore this field. When you are finished, you must free this string by calling the ldap_memfree function.

retdatap

(OUT) Points to a berval structure that contains data from the extended operation response.

freeit

(IN) Specifies whether the resources allocated by the res parameter are freed.

  • Zero indicates that the resources used by the res parameter are not freed automatically. When you are done with the res parameter, you need to call the ldap_msgfree function to free the memory.

  • Non-zero indicates that memory is freed after the function extracts the information.

Return Values

0x00

LDAP_SUCCESS

Non-zero

Failure. For a complete list, see LDAP Return Codes.

0x54

LDAP_DECODING_ERROR

0x59

LDAP_PARAM_ERROR

0x5A

LDAP_NO_MEMORY

0x5C

LDAP_NOT_SUPPORTED

Remarks

After calling the ldap_extended_operation and ldap_result functions, use ldap_parse_extended_result to parse the extended information returned by the LDAP server.

See Also

ldap_err2string, ldap_parse_result, ldap_parse_sasl_bind_result