snmdb_set_property manual page
Table of Contents

NAME

snmdb_set_property - sets the value of a particular property of an element

SYNOPSIS

#include <netmgt/netmgt_db.h>

snmdb_set_property(buffer, property, value) snmdb_buffer *buffer;
char *property;
snmdb_data value;

DESCRIPTION

If you are creating a new element, you should call snmdb_init_buffer(3n) to initialize the internal buffer of the element before you set the element's property. If you are modifying an existing element, you should call snmdb_read(3n) to read the element into the internal buffer before you make any change to the element's property. After you have modified the element, remember to call snmdb_update(3n) to write the modified element back to the database.

INPUT ARGUMENTS

buffer
pointer to a structure of type snmdb_buffer.

property
name of the property describing the element.

value
value of the property to be set to. The data type of this value should match the data type of the property. This parameter should not be the snmdb_data union structure. It should be the actual property type to set. If theproperty to set is of type integer, just pass the integer value.

RETURN VALUE

Returns 1 if successful. Otherwise, it returns 0, and the external variable snm_error(3n) is set to the error reason.

SEE ALSO

snmdb_read(3n), snmdb_update(3n), snmdb_get_property(3n)


Table of Contents