Sun Directory Server Enterprise Edition 7.0 Developer's Guide

slapi_mods_add()

Appends a new mod with a single attribute value to Slapi_Mods structure.

Syntax

#include "slapi-plugin.h"
 void slapi_mods_add( Slapi_Mods *smods, int modtype,
    const char *type, unsigned long len, const char *val);

Parameters

This function takes the following parameters:

smods

Pointer to an initialized Slapi_Mods.

modtype

One of LDAP_MOD_ADD, LDAP_MOD_DELETE, LDAP_MOD_REPLACE.

type

The LDAP attribute type.

len

The length in bytes of the attribute value.

val

The attribute value.

Description

This function appends a new mod with a single attribute value to a Slapi_Mods. The mod is constructed from copies of the values of modtype, type, len, and val.

Memory Concerns

This function must not be used on Slapi_Mods initialized with slapi_mods_init_byref().

See Also

slapi_mods_add_ldapmod()

slapi_mods_add_mod_values()

slapi_mods_add_modbvps()

slapi_mods_add_string()