Re: About the proposed new `mib' command.

clau@plaintree.com
Mon, 02 Jun 97 10:43:36 est

I also really like the new mib format command. Great!

I have a small suggestion for the new 'mib name' command. I believe
it is a frequently used command so I propose a separate command 'mib
fullname' instead for returning the <module>!<name>, or maybe a switch
in 'mib name', with the default behaving the old way. This switch can
also be used in other commands like:

mib parent
mib child
mib index

There could be others but that's all I can think of right now. Also,
I'm wondering if the following extra commands (related to mib name)
would be useful:

mib index_part label
mib name_part label

which returns the index and the name part of an mib object. For
example:

mib index_part ifType.3

would return 3, and

mib name_part ifType.3

would return ifType. Currently I'm using a simple procedure for this:

proc mib_index_part {label} {
set name [mib name $label]
set index_list [lreplace [split $name .] 0 0]
return [join $index_list .]
}

proc mib_name_part {label} {
set name [mib name $label]
return [lindex [split $name .] 0]
}

The commands can make table walking more efficient because we don't
have to 'snmp get' the index variable in order to get index. They are
also useful if we have an instance of a variable and we just want to
know the index (e.g. a trap telling us that a particular interface has
gone down, and we want to know the interface number).

$0.02

---------------------------------------------------------------------
Carmel Lau clau@plaintree.com
Software Designer 613-831-8300 x 248
Plaintree Systems Inc.

--
!! 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.