Joshua
Joshua

Reputation: 1737

How to translate SNMP "enterpriseSpecific trap" number to full OID?

I'm currently using net-snmp snmptranslate to translate the EnterpriseOID of the traps received by my custom coded trap receiver using the following command:

snmptranslate -M. -mALL .1.3.6.1.2.1.39.2.2

Now, I am receiving SNMP v1 traps with

generic = enterpriseSpecific (6)

so I need to decode the specific trap number, e.g. 10003 to the 'full numeric' OID. Is there a way to do this using snmptranslate? I already have the MIB file associated with the traps.

Upvotes: 1

Views: 3570

Answers (1)

Joshua
Joshua

Reputation: 1737

I found out that I can convert an SNMP v1 specific number to OID using combining the enterprise OID, with a 0, followed by the specific trap number, e.g.

EnterpriseOID + '0' + SpecificTrap

Upvotes: 1

Related Questions