Re: [tkined] "mib load" command

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 8 Jul 1998 17:15:14 +0200

>>>>> Michael Landman writes:

Michael> "The Tnm extension automatically loads all MIB files named in
Michael> the global Tcl variable $tnm(mibs). This allows to pre-define
Michael> a set of useful MIB definitions. The default is the set of
Michael> IETF MIBs. It is possible to bypass the auto-loading
Michael> mechanism if the first mib command is a mib load command.
Michael> Note that the snmp command may also invoke mib commands."

The wording is a bit ugly here.

Michael> I'm a bit confused on the "possible to bypass" section
Michael> above... I looked at $tnm(mibs), and saw the list of mibs. It
Michael> is unclear to me when (and if) these mibs are loaded. Reading
Michael> above, it seems that if the first "mib" command is "mib load"
Michael> -- then NONE of the mibs in $tnm(mibs) are loaded. However,
Michael> if the first command I execute is: "mib load
Michael> <some_enterprise_specific_mib>", and the next command is "mib
Michael> name 1.3.6.1.2.1.1.3.0" -- I receive "sysUpTime.0". How did
Michael> it know, if it didn't load all the mibs in $tnm(mibs), which
Michael> I thought it wasn't supposed to do, because the first mib
Michael> command I did after starting tcl was "mib load
Michael> <some_enterprise_specific_mib>"??

There are actually two variables: The first one $tnm(mibs:core) lists
the core SNMP MIB modules that you usually always expect to be
available. The $tnm(mibs) variable lists additional MIB modules that
you usually customize in $tnm(library)/site/init.tcl to fit the needs
of your site.

A Tcl script which knows that it only needs a few MIB module can load
these modules before the Tnm extension tries to auto-load MIB
definitions. This is similar to replacing $tnm(mibs) with the MIB
modules you really need. Note that this does not affect the MIBs
listed in $tnm(mibs:core). And this is why you still get "sysUpTime.0"
for 1.3.6.1.2.1.1.3.0. You can change tnm(mibs:core) and "sysUpTime.0"
will also become unknown. However, you usually run into problems if
you do not have access to the core definitions.

The question is whether the special semantics associated with the
first "mib load" command really make sense because you can get the
same effect by simply setting tnm(mibs) to the list of MIB modules you
need.
Juergen

Juergen Schoenwaelder schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany. (Tel. +49 531 / 391 3283)

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.