Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_parse_extended_result()

Parses the results of an LDAP extended operation and retrieves the OID and data returned by the server.

This function implements an extension to the LDAP v3 protocol. Extended operations might not be supported on all LDAP servers. Call this function when interacting with LDAP servers that support this LDAP v3 extension. See "Determining the Extended Operations Supported" on page 308 to determine if the server supports extended operations.

Syntax

#include <ldap.h> 
int ldap_parse_extended_result( LDAP *ld, LDAPMessage *res,
   char **retoidp, struct berval **retdatap, int freeit );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

res

Pointer to the LDAPMessage structure containing the results of an LDAP operation.

retoidp

Pointer to the object identifier (OID) returned by the server after performing the extended operation.

When done, you can free this by calling the ldap_memfree() function.

retdatap

Pointer to the pointer to a berval structure containing the data returned by the server after performing the extended operation.

When done, you can free this by calling the ber_bvfree() function.

freeit

Specifies whether or not to free the results of the operation (the LDAPMessage structure specified by the res argument). The parameter can have the following possible values:

Returns

One of the following values, which indicates the result of parsing the server's response (this value does not apply to the LDAP extended operation itself):

Description

After you call the ldap_extended_operation() function and the ldap_result() function, you can pass the results to the ldap_parse_extended_result() function. ldap_parse_extended_result() parses the server's response to an extended operation.

This function gets the following data from the server's response:

The LDAP server must support the extended operation. The Netscape Directory Server 3.0 supports a server plug-in interface that you can use to add support for extended operations to the server. For details, see the Netscape Directory Server 3.0 Programmer's Guide.

See Also

ldap_extended_operation(), ldap_get_lderrno().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23