HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Table 33-1 LDAPMod manipulation routines (continued)
DescriptionFunction
Frees a Slapi_Mods structure.
“slapi_mods_free()”
Initializes a Slapi_Mods iterator and returns the first LDAPMod.
“slapi_mods_get_first_mod()”
Initializes a Slapi_Mods iterator and returns the first mod wrapped in a
Slapi_Mods structure.
“slapi_mods_get_first_smod()”
Gets a reference to the array of LDAPMod in a Slapi_Mods structure.
“slapi_mods_get_ldapmods_byref()”
Retrieves the array of LDAPMod contained in a Slapi_Mods structure.
“slapi_mods_get_ldapmods_passout()”
Increments the Slapi_Mods iterator and returns the next LDAPMod.
“slapi_mods_get_next_mod()”
Increments the Slapi_Mods iterator and returns the next mod wrapped in a
Slapi_Mods.
“slapi_mods_get_next_smod()”
Gets the number of mod in a Slapi_Mods structure.
“slapi_mods_get_num_mods()”
Initializes a Slapi_Mods.
“slapi_mods_init()”
Initializes a Slapi_Mods that is a wrapper for an existing array of LDAPMod.
“slapi_mods_init_byref()”
Initializes a Slapi_Mods structure from an array of LDAPMod.
“slapi_mods_init_passin()”
Inserts an LDAPMod into a Slapi_Mods structure after the current iterator
position.
“slapi_mods_insert_after()”
Inserts an LDAPMod anywhere in a Slapi_Mods.
“slapi_mods_insert_at()”
Inserts an LDAPMod into a Slapi_Mods structure before the current iterator
position.
“slapi_mods_insert_before()”
Inserts an smod anywhere in a Slapi_Mods structure.
“slapi_mods_insert_smod_at()”
Inserts an smod before a Slapi_Mods structure.
“slapi_mods_insert_smod_before()”
Decrements the Slapi_Mods current iterator position.
“slapi_mods_iterator_backone()”
Allocates a new uninitialized Slapi_Mods structure.
“slapi_mods_new()”
Removes the mod at the current Slapi_Mods iterator position.
“slapi_mods_remove()”
33.1 slapi_entry2mods()
Description This function creates an array of LDAPMod of type LDAP_MOD_ADD from a
Slapi_Entry.
Syntax
#include "slapi-plugin.h"
int slapi_entry2mods(const Slapi_Entry *e, char **dn,
LDAPMod ***attrs);
Parameters This function takes the following parameters:
Pointer to a Slapi_Entry.e
Address of a char* that will be set on return to the entry DN.dn
Address of an array of LDAPMod that will be set on return to a copy of the entry
attributes.
attrs
Returns This function returns one of the following values:
0 if successful.
A nonzero value if not successful.
266 Functions for LDAPMod manipulation