33.17. slapi_mod_init_valueset_byval()

Initializes the given smod in a Slapi_Mod with the given LDAP operation and attribute type. The attribute values in the smod are initialized using Slapi_ValueSet. All function parameters are copied, and type and svs are not modified.
This function checks that an attribute being modified or added does not exist, and, if it does exist, it removes that value from the list of modifications.
Syntax

#include "slapi-plugin.h"
void slapi_mod_init_valueset_byval(Slapi_Mod *smod, int op, const char *type, const Slapi_ValueSet *svs)

Parameters

This function takes the following parameters:

smod
Pointer to an uninitialized Slapi_Mod.
op One of LDAP_MOD_ADD, LDAP_MOD_DELETE, or LDAP_MOD_REPLACE, combined using the bitwise or operator with LDAP_MOD_BYVALUES.
type An attribute type.
svs Pointer to the uninitialized Slapi_ValueSet structure of which to get the count.
Memory Concerns

Use slapi_mods_free() or slapi_mod_done() to clean up the memory allocated by slapi_mod_init_valueset_byval