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 #
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):
cget
config
destroy
mpds
new
bind
bulk
cancel
get
inform
pending
trap
next
set
wait
walk
format
scan
usm
tnm