Re: Command to get integer ranges?

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Thu, 12 Sep 1996 18:34:13 +0200

Scott Koumjian <sak@eng1.netlink.com> said:

Scott> Using scotty 2.0.2 and scotty 2.1.1, for the MIB object sysServices
Scott> which has a syntax of INTEGER (0..127),
Scott> 'mib syntax sysServices' returns "INTEGER" and
Scott> 'mib tc sysServices' returns nothing.

Scott> What I meant by accessible is that a mib command would actually return
Scott> the (0..127) part of the syntax, something like
Scott> 'mib syntax sysServices' would return "INTEGER (0..127)" or
Scott> 'mib tc sysServices' would return "{} INTEGER {} {(0..127)}"

I would like to see a new mib sub-command which allows to access
information about type restrictions etc. in a way which makes it
directly accessible within Tcl (in your proposal, you still need some
Tcl code to extract the lower and upper bounds). Creating a new
command has the advantage that it a) does not introduce any
incompatibilities and b) makes access fast and easy from the Tcl
perspective if done right. Of course, it is a bit more effort to
implement this solution and that is the reason why I started work on a
new MIB parser (which will make these additions like this much easier
because it will be based on a yacc grammar).

Anyway, patches for a short-term solution are nevertheless welcome.

Juergen

--
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)