In SMIv1 it was common practice to declare at top OID for each MIB as the first value symbol. In SMIv2 one should really declare a MODULE-IDENTITY instead.
The Mibble to for Mib.getRootSymbol() attempts to be clever by traversing the OID tree upwards from the first symbol found in the MIB. This way, the ordering of the symbols in the MIB file doesn't matter. But it is still assumed that there is a single root node declared in the same MIB. See the source code here: https://github.com/cederberg/mibble/blob/master/src/java/net/percederberg/mibble/Mib.java#L575 Now, if you just want all values in the MIB, you can always use getAllSymbols() instead. Or use the OID tree to detect that there are multiple "root node" in this MIB at the same level. The OID tree is always populated all the way back to the iso(1) root, thanks to imported MIBs. BTW. If you're working on the OID tree, there will be a few new utility methods in the upcoming 2.10 version. You can find an alpha version in the development download area: http://www.mibble.org/download/development/index.html Hope this helps! Cheers, /Per On Thu, Feb 27, 2014 at 3:48 PM, Matthew Walker <mwal...@questcontrols.com>wrote: > Morning all.. > > I've encountered an odd MIB that I could use some insight on. My > implementation (using mibble-2.9.3) is correctly only finding one OID from > this MIB since the there is no true RootSymbol here.. Being void of a > MODULE-IDENTITY mibble seems to target the first OBJECT in the MIB > 'pbtBatMeasurementInterval' as the RootSymbol. Since this OBJECT has no > children, my code only finds the one entry.. > > Is it standard to have OIDs out there without MODULE-IDENTITY? > > If so, I'm curious what code is used to parse them when there is no > hierarchy from which to build an OID tree? > > Much thanks and here is the vendor's MIB that I'm trying to parse. > > The MIB Browser shows them all under a 'VALUES' node - so I think my code > is perhaps not adapting well.. > > -Matthew > > _______________________________________________ > Mibble-users mailing list > Mibble-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/mibble-users > >
_______________________________________________ Mibble-users mailing list Mibble-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/mibble-users