Table of Contents | Previous | Next | Index

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

ldap_extended_operation()

Sends a request to the server to perform an extended operation asynchronously.

Syntax

#include <ldap.h>
int ldap_extended_operation( LDAP *ld, const char *requestoid,
   struct berval *requestdata, LDAPControl **serverctrls,
   LDAPControl **clientctrls, int *msgidp );

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.

requestoid

Object identifier (OID) of the extended operation that you want the server to perform.

requestdata

Pointer to a berval structure containing the data that you want passed to the server to perform the extended operation.

serverctrls

Pointer to an array of LDAPControl structures representing LDAP server controls that apply to this LDAP operation. If you do not want to pass any server controls, specify NULL for this argument.

clientctrls

Pointer to an array of LDAPControl structures representing LDAP client controls that apply to this LDAP operation. If you do not want to pass any client controls, specify NULL for this argument.

msgidp

Pointer to an integer that will be set to the message ID of the LDAP operation. To check the result of this operation, call ldap_result() and ldap_parse_result() functions.

Returns

One of the following values:

Description

The ldap_extended_operation() function sends a request to the server to perform an LDAP v3 extended operation synchronously.

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.

For information on determining the extended operations supported by a server, see "Determining the Extended Operations Supported" on page 308.

After processing an LDAP v3 extended operation, an LDAP server can return an object identifier and data in the result. To parse the OID and data from the result, call the ldap_parse_extended_result() function.

ldap_extended_operation() is an asynchronous function; it does not directly return results. If you want the results to be returned directly by the function, call the synchronous function ldap_extended_operation_s() instead. (For more information on asynchronous and synchronous functions, see "Calling Synchronous and Asynchronous Functions" on page 80.)

In order to get the results of the LDAP extended operation, you need to call the ldap_result() function, the ldap_parse_extended_result() function, and the ldap_get_lderrno() function. (See "Performing an Asynchronous Extended Operation" on page 309 for details.) For a list of possible result codes for an LDAP extended operation, see the result code documentation for the ldap_extended_operation_s() function.

See Also

ldap_extended_operation_s(), ldap_result(), ldap_parse_extended_result(), ldap_get_lderrno().


Table of Contents | Previous | Next | Index

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