[SNMP4J] How to perform OctetString values from Windows SNMP trap variable bindings
Frank Fock
fock at agentpp.com
Sun Jul 26 21:08:01 CEST 2009
Anton,
If you do not know the SMI definition
of a trap variable, you can
(1) ignore it
(2) try to reverse engineer their definition
by studying samples
(3) only use the facts you know for sure about
the variable, i.e. its SMI syntax which is sent
over the wire (OCTET STRING, IpAddress, OID,
Integer32, etc.)
Best regards,
Frank
Anton Boronnikov wrote:
> I configured snmp agent in my Windows XP. Then I generate some events
> leading to sending a trap.
> So I catch this traps. There are some variable bindings with oids such as
> "1.3.6.1.4.1.311.1.13.1.9999.1.0". I did not find any mib file describing
> this oids. And it seems that there is no such mib.
> The problem is how to perform this variable values. As I can not get mib
> symbol I can not obtain variable syntax. If I have no syntax I don't know
> how to convert variable value.
> Variable values are OctetString objects. And the first value is event
> description string (on Russian language, because my Windows XP is Russian)
> encoded to OctetString. I could do this:
> byte[] bytes = ((OctetString) var).toByteArray();
> String decodedValue = new String(bytes);
> But. I can not do this for each variable value contained in trap. What if
> it is an IP Address? Or Mac address? Or something else that I should
> decode simply as var.toString() ?
> Did somebody face my problem? How to perform Windows snmp trap variable
> OctetString value if we don't know anything about its oid?
>
--
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list