Re: [tkined] Trouble adding mib file to tkined

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Tue, 9 Jun 1998 09:00:09 +0200

>>>>> Vincent Qing Yin writes:

Vincent> I'm new to tkined. And I have trouble with a basic task of
Vincent> adding a new mib file to tkined/scotty. I created a trivial
Vincent> mib file with only one line. And here's the scotty session:

Vincent> columbia<156> scotty % cat test.mib mgmt OBJECT
Vincent> IDENTIFIER ::= { iso org(3) dod(6) internet(1) mgmt(2) }

Vincent> % mib load test.mib test.mib:0: OBJECTIDENTIFIER is a
Vincent> reserved word ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Vincent> Would anyone please point out to me what's wrong?

The file is *not* a MIB file. A MIB file must be an ASN.1 module and
must look like the following:

: <ModuleName> DEFINITION ::= BEGIN
:
: -- SMI MIB definitions go here
:
: END

The error message generated by scotty could be improved to better
describe the situation.

Vincent> BTW, that mib file is the 1st line of `mib.txt' from
Vincent> cmu-snmp-linux-3.3.

The CMU MIB parser is ugly. It does not really care what a MIB module
is or not. The scotty parser is a bit better, but still a dirty hack.
Don't expect that something which is accepted by the CMU MIB parser is
a valid MIB file. I strongly suggest to use real MIB compilers like mosy
(ftp://ftp.ibr.cs.tu-bs.de/pub/networking/snmp/compiler/mosy-8.0.0.tar.gz)
or SMICng from (http://www.snmpinfo.com/) to verify that a MIB module
is syntactically correct.
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.