slapi_add_internal()

The slapi_add_internal() performs an LDAP add operation to add a new directory entry (specified by a DN and a set of attributes) from your plug-in.

Unlike the standard LDAP add operation, no LDAP result code is returned to a client. The result code is instead placed in a parameter block that is returned by the function.

Syntax
#include "slapi-plugin.h"
Slapi_PBlock *slapi_add_internal( char * dn,
			LDAPMod **mods,
			LDAPControl **controls, int l );
Parameters
dn
The Distinguished name (DN) of the entry that you want to add.
mods
A pointer to a NULL-terminated array of pointers to LDAPMod structures that represent the attributes of the new entry that you want to add.
controls
A NULL-terminated array of LDAP controls that you want applied to the add operation.
l
Included for compatibility only. It is not used.
Returns
A new parameter block with the following parameter set is returned:
  • SLAPI_PLUGIN_INTOP_RESULT specifies the LDAP result code for the internal LDAP operation.