Hi!
I'm using java Mibble library to process MIB files and create MIB implementation for my snmp agent. And have a little problem with that:
There is a DisplayString type that is the representation of OCTET_STRING but can contains only 7bit ASCII chars. There is also type like AdminString that is another represetnation of OCTET_STRING but can contains all ASCII chars.
So my question is: how to distinguish DisplayString (so I can check for chars that are greater then 126 in my implementation) from Admin String? i tried to use MibTypeTag[1] but apparently I don't know HOW to use it (any hints?) and it says that "it is possible to distinguish between types using the same or a similar primitive ASN.1 type representation (such as DisplayString and IpAddress)"
My written english isn't perfect so here's what I would like to do:
if (MibTypeTag == DisplayString) {
check for chars greater than 126
}
else if (MibTypeTag == AdminString) {
awesome! nothing to do!
}
Thanks in advance!
[1] http://www.mibble.org/doc/release/api/net/percederberg/mibble/MibType.html