snmdb_init_buffer manual page
Table of Contents

NAME

snmdb_init_buffer - initialize a buffer with the element's name and type

SYNOPSIS

#include <netmgt/netmgt_db.h>

snmdb_init_buffer(name, type, buffer)
char *name;
char *type;
snmdb_buffer *buffer;

DESCRIPTION

Before adding a new element into the database, you will need to call snmdb_init_buffer to initialize the buffer for the element, and also to set the name and type for the element. You may then call snmdb_set_property(3n) to set the values of any properties of the element, and then call
snmdb_add_to_view(3n),
snmdb_add_connection(3n), snmdb_set_color(3n), or snmdb_add_agent(3n) to add other records describing the element. Finally, call snmdb_add(3n) to add the element into the database.

INPUT ARGUMENTS

name name of the element.

type type of the element.

buffer
pointer to a structure of type snmdb_buffer.

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_set_property(3n),
snmdb_add_to_view(3n),
snmdb_add_connection(3n),
snmdb_set_color(3n), snmdb_add_agent(3n), snmdb_add(3n)


Table of Contents