bottrap
< Prev Back to Table of Contents Next >

The SNMP Session Command

As with SMI databases, MIB Smithy SDK supports any number of active SNMP sessions that can be created, used, and destroyed as necessary. Each session may be used to communicate with an individual SNMP agent, and each session can (if desired) be confused to use one of any of the active SMI databases. Unless otherwise configured, each session defaults to using the master SMI database to look up necessary type and value information.

Each session other than the master is identified by snmplib# where where # is an integer that uniquely identifies the session (e.g. snmplib1). The full, unique name of the session also identifies a unique Tcl command used to access the session's configuration and request interfaces.

The master session, called 'snmplib' (without an integer suffix) is always present -- even if destroyed, it is immediately recreated and initialized with default SNMP configuration parameters such as 127.0.0.1 (localhost) as the IP address and public/private community strings.

The SNMP Session command provides a number of other interfaces for for creating and destroying other sessions, configuring access parameters and issuing SNMP requests in both synchronous and asynchronous modes. The subcommands supported by the session command are as follows (follow the link for more details):

Command Description
new Create/open a new SNMP Session
destroy Destroy/close an existing SNMP Session
mpds Get a list of SNMP sessions
config Configure session parameter values.
cget Get current session configuration parameter values.
get Send an SNMP Get Request.
set Send an SNMP Set Request.
next Send an SNMP Get-Next Request.
bulk Send an SNMP Get-Bulk Request.
inform Send an SNMP Inform Request.
trap Send an SNMP Trap.
bind Register to receive notification events.
pending Return the number of pending requests.
cancel Cancel pending requests.
tnm Used in the implementation of the Scotty/TNM Compatibility Package
< Prev Back to Table of Contents Next >