Writing Extended Operation Functions - Netscape DIRECTORY SERVER 6.01 - PLUG-IN Manual

Table of Contents

Advertisement

Writing Extended Operation Functions

Writing Extended Operation Functions
Like other plug-in functions, extended operation functions pass a single parameter
block (
example declaration:
int my_ext_func( Slapi_PBlock *pb );
Extended operation functions should return a value of
non-zero value if they are unsuccessful.
When the Directory Server receives an extended operation request, the front-end
calls the extended operation function with the OID value specified in the request.
The front-end makes the following information available to the extended function
in the form of parameters in a parameter block.
Table 10-1
Parameter ID
SLAPI_EXT_OP_REQ_OID
SLAPI_EXT_OP_REQ_VALUE
SLAPI_EXT_OP_RET_OID
SLAPI_EXT_OP_RET_VALUE
Typically, your function should perform an operation on the value specified in the
SLAPI_EXT_OP_REQ_VALUE
your function should return a single value, according to the following:
If your function has sent a result code back to the client, you should return the
value
front-end does not need to send a result code.
If your function has not sent a result code back to the client (for example, if the
result is
front-end will send this result code back to the client.
118
Netscape Directory Server Plug-In Programmer's Guide • January 2002
) and return an integer value, as shown in the following
Slapi_PBlock
Extended Function Parameter Block Arguments
parameter. After the extended operation completes,
SLAPI_PLUGIN_EXTENDED_SENT_RESULT
), your function should return an LDAP result code. The
LDAP_SUCCESS
0
Data Type
Description
Object ID (OID) of the extended
char *
operation specified in the
request.
Value specified in the request.
struct
berval*
Object ID (OID) that you want
char *
sent back to the client.
Value that you want sent back
struct
to the client.
berval*
. This indicates that the
if they are successful and a

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.01

Table of Contents