Chapter 49. Functions Related to Data Interoperability
Table 49.1. Routines Related to Data Interoperability
| Function | Description |
|---|---|
| slapi_op_reserved() | Allows a plug-in to recognize reserved default operations of the Directory Server. |
| slapi_operation_set_flag() | Sets a flag for the operation. |
| slapi_operation_clear_flag() | Clears a flag for the operation. |
| slapi_operation_is_flag_set() | Determines whether a flag is set in the operation. |
49.1. slapi_op_reserved()
This function allows a plug-in to recognize reserved default operations, such as the base-scope search on the root dse and the operations on the reserved naming contexts, for handling by the core Directory Server and not by the DIOP plug-in. This function allows you to implement a custom DIOP plug-in that does not affect the default behavior of the server. The code snippet below is a sample for a plug-in that handles the LDAP delete operation. The callback for the LDAP delete operation nullsuffix_delete will ignore all the LDAP delete operations on the reserved-naming contexts (such as cn=schema, cn=config, and cn=monitor).
#define PLUGIN_OPERATION_HANDLED 0
#define PLUGIN_OPERATION_IGNORED 1
static int nullsuffix_delete( Slapi_PBlock *pb )
{
if( slapi_op_reserved(pb) ){
return PLUGIN_OPERATION_IGNORED;
}
slapi_log_error( SLAPI_LOG_PLUGIN, PLUGIN_NAME,
"nullsuffix_delete\n" );
/* do the deletes */
send_ldap_result( pb, LDAP_SUCCESS, NULL, NULL, 0, NULL );
return PLUGIN_OPERATION_HANDLED;
}
#include "slapi-plugin.h" int slapi_op_reserved(Slapi_PBlock *pb);
This function takes the following parameter:
|
pb
| Parameter block. |
This function returns 0 if the operation is not reserved and a non-zero value if the operation is reserved.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.