ldap_parse_extended_result()--Parse extended result
Syntax
#include <ldap.h> int ldap_parse_extended_result( LDAP *ld, LDAPMessage *res, char **resultoidp, struct berval **resultdatap, int freeit)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_parse_extended_result() function is used to parse the result of an extended operation intiated by ldap_extended_operation().
Authorities and Locks
No IBM® i authority is required.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init() or ldap_ssl_init().
- res
- (Input) Specifies the result of an LDAP operation as returned by ldap_first_message() or ldap_next_message() where the message type is LDAP_RES_EXTENDED.
- resultoidp
- (Input) This result parameter specifies a pointer which is set to point to an allocated, dotted-OID text string returned from the server. This string should be disposed of using the ldap_memfree() API. If no OID is returned, *resultoidp is set to NULL.
- resultdatap
- (Input) This result parameter specifies a pointer to a berval structure pointer that is set to an allocated copy of the data returned by the server. This struct berval should be disposed of using ber_bvfree(). If no data is returned, *resultdatap is set to NULL.
- freeit
- (Input) Specifies a boolean value that determines if the LDAP result (as specified by res) is to be freed. Any non-zero value will result in res being freed after the requested information is extracted. Alternatively, the ldap_msgfree() API can be used to free the result at a later time.
Return Value
- LDAP_SUCCESS
- if the request was successful.
- another LDAP error code
- if the request was not successful.
Error Conditions
If ldap_extended_result() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. ldap_get_errno() function to retrieve the error information.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_parse_extended_result API. |
Related Information
- ber_bvfree() -- Free a berval Structure
- ldap_extended_operation -- Perform extended operation
- ldap_extended_operation_s -- Perform extended operations synchronously.
- ldap_first_message() -- Retrieve first LDAP message.
- ldap_msgtype() -- Retrieve the type of an LDAP message.
- ldap_next_message() -- Retrieve next LDAP message.
- ldap_result -- Retrieve Result of an Asynchronous LDAP Operation
The ldap_parse_extended_result() API supports LDAP V3 server controls and client controls.
API introduced: V5R1
[ Back to top | LDAP APIs | APIs by category ]