cederberg / mibble

Mibble is an open-source SNMP MIB parser library for Java.
https://www.mibble.org/
Other
113 stars 68 forks source link

MIB loader error when loading SNMPv2-CONF, part of RFC 1904 #40

Closed stroeste-sms-group closed 3 years ago

stroeste-sms-group commented 3 years ago

When trying to load SNMPv2-CONF, which is part of RFC 1904, the MIB loader reports an error.

I came across this problem when trying to load SNMPv2-MIB, which is part of RFC 3418, to have the definitions for the v2 notifications equivalent to the generic traps like "cold start", "warm start", "link down", "link up" etc.

Since the 'erroneous' line in SNMPv2-CONF is originally defined like this in RFC 1904, is assume there is a bug in mibble concerning this.

Find all MIBs needed in attached archive SNMPv2-MIB.zip

ERROR: unexpected token "SYNTAX", expected "END"
in file "C:\Users\stroeste\dev\CARTA-SnmpTrapSender\doc\mibs\rfc\SNMPv2-CONF.mib"
at line 157, column 33
                  "SYNTAX" type(SYNTAX)
                                ^

WARNING: couldn't find referenced MIB 'SNMPv2-CONF', skipping import of 3 symbols
in file "C:\Users\stroeste\dev\CARTA-SnmpTrapSender\doc\mibs\rfc\SNMPv2-MIB.mib"
at line 17, column 17
           FROM SNMPv2-CONF;
                ^
cederberg commented 3 years ago

There are several know errata to MIB files published in the RFCs, which makes them invalid. This is the reason that Mibble is distributed with a mibble-mibs-2.10.1.jar file containing updated RFC mibs with corrections applied. Search for the FIX: string in the MIB files to list all changes.

In this particular case, it looks like the MIB files provided are out of date. At least their content doesn't quite match what Mibble distributes (which is extracted from the libsmi project).

Also, make sure that this jar file is on the CLASSPATH and that its base path isn't removed from MibbleLoader. See the Java API FAQ for code example on how to initialize a loader that uses the bundled MIB files.

I'm closing this issue as answered. Please reopen if issue remains somehow.