HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
An attribute type.
type
Pointer to the uninitialized Slapi_ValueSet structure of which to get the count.svs
Memory concerns Use “slapi_mods_free()” or “slapi_mod_done()” to clean up the memory
allocated by slapi_mod_init_valueset_byval
See also
“slapi_mod_done()”
“slapi_mods_free()”
“Slapi_ValueSet”
Slapi_Mod
33.18 slapi_mod_isvalid()
Determines whether a Slapi_Mod structure is valid.
Description Use this function to verify that the contents of Slapi_Mod are valid. It is considered
valid if the operation type is one of LDAP_MOD_ADD, LDAP_MOD_DELETE, or LDAP_MOD_REPLACE,
combined using the bitwise or operator with LDAP_MOD_BYVALUES; the attribute type is not
NULL; and there is at least one attribute value for add and replace operations.
Syntax
#include "slapi-plugin.h"
int slapi_mod_isvalid(const Slapi_Mod *mod);
Parameters This function takes the following parameter:
Pointer to a Slapi_Mod.smod
Returns This function returns one of the following values:
0
If the Slapi_Mod is not valid.
1
If the Slapi_Mod is valid.
33.19 slapi_mod_new()
Description This function allocates a new uninitialized Slapi_Mod. Use this function when
you need to a Slapi_Mod allocated from the heap, rather than from the stack.
Syntax
#include "slapi-plugin.h"
Slapi_Mod* slapi_mod_new( void );
Parameters This function takes no parameters.
Returns This function returns a pointer to an allocated, uninitialized Slapi_Mod.
See also “slapi_mod_free()”
33.20 slapi_mod_remove_value()
Removes the value at the current Slapi_Mod iterator position.
Syntax
#include "slapi-plugin.h"
void slapi_mod_remove_value(Slapi_Mod *smod);
Parameters This function takes the following parameter:
Pointer to an initialized Slapi_Mod.smod
272 Functions for LDAPMod manipulation