Support TEXTUAL CONVENTION v1
Closed this issue · 4 comments
Hi,
Thanks for maintaining this library.
Currently the MIB parser correctly parses TEXTUAL CONVENTION v1 but these are not returned by the store.getSyntaxTypes() method. This is because there's no TEXTUAL-CONVENTION macro, the definition directly follows the object name.
DellStateCapabilities ::= INTEGER {
-- If set to 0 (zero), object has no state capabilities
unknownCapabilities(1), -- object's state capabilities are unknown
-- The object's state capabilities allow it to be set to:
enableCapable(2), -- be disabled (offline) or be enabled (online)
notReadyCapable(4), -- not ready
enableAndNotReadyCapable(6)
}
Another (simpler) example
DellBoolean ::= INTEGER (0..1) -- 0 = FALSE, 1 = TRUE
Is this something you'll want to support?
I can share a MIB holding such definitions, just ask.
Thanks,
David
Hi @ddolcimascolo - yes if you could send an example MIB with this kind of definition, that would be great for my reference. It would be worth supporting this if possible. Given the lack of information in the pre-TEXTUAL CONVENTION type definitions, I'll have to see if I can heuristically determine whether an entry is a v1 data type assignment - probably due to what isn't present, given that not a lot is present!
Here you are. The MIB is part of a larger set used to monitor Dell machines through an iDRAC.
Thanks for the example MIB @ddolcimascolo - that's great to have. I've implemented support for SMIv1 Defined Types now (RFC1155 Section 3.3), and have also implemented support for the SMIv1 TRAP-TYPE macro, as defined in RFC1215. These changes are published in version 3.14.0 of the npm.
That's excellent news. Thanks for the great work 🙏
David