HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
33.40 slapi_mods_init()
Description Initializes a Slapi_Mods so that it is empty but initially has room for the given
number of mods.
Syntax
#include "slapi-plugin.h"
void slapi_mods_init(Slapi_Mods *smods, int initCount);
Parameters This function takes the following parameters:
Pointer to an initialized Slapi_Mods.mods
Suggested number of mods for which to make room. The minimum value is 0.initCount parameter
Memory concerns If you are unsure of how much room you will need, you may use an
initCountof 0. The Slapi_Mods expands as necessary.
See also “slapi_mods_done()”
33.41 slapi_mods_init_byref()
Description Initializes a Slapi_Mods containing a reference to an array of LDAPMod. This
function provides the convenience of using Slapi_Mods functions to access LDAPMod array
items.
Syntax
#include "slapi-plugin.h"
void slapi_mods_init_byref(Slapi_Mods *smods, LDAPMod **mods);
Parameters This function takes the following parameters:
Pointer to an uninitialized Slapi_Mods.mods
A null-terminated array of LDAPMod.mods
Memory concerns The array is not destroyed when the Slapi_Mods is destroyed. You cannot
insert new mods in a Slapi_Mods that has been initialized by reference.
See also “slapi_mods_done()”
33.42 slapi_mods_init_passin()
Description This function initializes a Slapi_Mods by passing in an array of LDAPMod. This
function converts an array of LDAPMod to a Slapi_Mods.
Syntax
#include "slapi-plugin.h"
void slapi_mods_init_passin(Slapi_Mods *smods, LDAPMod **mods);
Parameters This function takes the following parameters:
Pointer to an uninitialized Slapi_Mods.mods
A null-terminated array of LDAPMod.mods
Memory concerns The responsibility for the array and its elements is transferred to the
Slapi_Mods. The array and its elements are destroyed when the Slapi_Mods is destroyed.
See also “slapi_mods_done()”
280 Functions for LDAPMod manipulation