Net-snmp has a small number of types:
i: INTEGER,u: unsigned INTEGER, t: TIMETICKS, a: IPADDRESS o: OBJID, s: STRING, x: HEX STRING, d: DECIMAL STRING U: unsigned int64, I: signed int64, F: float, D: double
Interestingly, the story does not end there. For instance, if I have an unsigned int64, I will receive Gauge32 as the type after sending "snmpget". I am looking for a table which lists all the possible "type strings" (like "Gauge32", or "INTEGER") which Net-SNMP will return along with the actual type that the string is associated with. So this table would have obvious entries like:
(return value from snmpget, type, snmpset symbol) -> ("INTEGER", INTEGER, i)
If anyone knows where to find the comprehensive list, please post.
This is not a straight answer to your question.
SNMP RFC documents published on IETF only define a limited set of types,
http://www.logmatrix.com/blog/bid/69744/Understanding-SNMP-Data-Types
They should be considered as built-in types.
Besides the built-int types, there are other derived types defined via MACRO, such as DisplayString, and so on.
I created clones of NET-SNMP utilities based on #SNMP, and what I learned is that not all types in NET-SNMP man pages are correct. Therefore, my clone of snmpset only handles a subset of those types (U, I, F, and D are not supported),
https://github.com/lextm/sharpsnmplib/blob/master/Samples/CSharp/snmpset/Program.cs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With