Re: About the proposed new `mib' command.

Juergen Schoenwaelder (schoenw@gaertner.de)
Wed, 4 Jun 1997 22:17:02 +0200

clau@plaintree.com said:

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

Well, I am not sure how much code is really affected if 'mib name'
suddenly returns a unique name. In some cases, the code will become
more reliable, in some cases the output formatting might be a bit
unusual, but I do not see real problems here. BTW, I already added a
'mib label' command which returns the descriptor used in the
registration of a MIB node. The general slightly simplified syntax is
now

[<module>!]<label>[.<label>]*[.<instance>]

where <instance> contains an oid string in dotted notation (including
hex sub-identifier). The [.<label>]* part is not really needed, but
frequently used by people with CMU experience. There are three
commands to access the various parts:

mib module <arg> ;# returns the module name
mib label <arg> ;# returns the short label of the MIB node
mib instance <arg> ;# returns the oid string following a MIB
node created by an OBJECT-TYPE macro

Examples:

mib module sysDescr ;# => SNMPv2-MIB
mib label system.1.0 ;# => sysDescr
mib label system.sysDescr ;# => sysDescr
mib label SNMPv2-MIB!sysDescr.0 ;# => sysDescr
mib instance system.1.0 ;# => 0
mib instance system.42.0 ;# => ""

clau> Also, I'm wondering if the following extra commands
clau> (related to mib name) would be useful:
clau>
clau> mib index_part label
clau> mib name_part label
clau>
clau> which returns the index and the name part of an mib object.

I think the mib label and mib instance commands do exactly what you
are looking for.

BTW, I never liked the command name 'mib successor'. Are there any
proposals for a better name?
Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! 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.