[SNMP4J] - BER -> OID resolution i.e : snmpCommunityName

Garcia, Maurice Maurice_Garcia at Cable.Comcast.com
Thu Jan 2 04:40:53 CET 2014


Thanks for the quick reponse!!

I am using the SNMP4J-SMI with the purchased license.

I used both the OID.format() and OID.toString, but I am getting the same result.


              if (true) {
                     System.out.println("BEROIDConversion.getOidName() - BER: " + new HexString(bBER).toString());
                     System.out.println("BEROIDConversion.getOidName() - OID.toString(): " + oOID.toString());
                     System.out.println("BEROIDConversion.getOidName() - OID.format(): " + oOID.format());
              }


BEROIDConversion.getOidName() - BER: 30 1C 06 11 2B 06 01 06 03 12 01 01 01 02 6D 74 61 70 72 6F 76 04 07 6D 74 61 5F 70 77 64
BEROIDConversion.getOidName() - OID.toString(): snmpCommunityName.109.116.97.112.114.111.118
BEROIDConversion.getOidName() - OID.format(): snmpCommunityName.109.116.97.112.114.111.118


Am I doing something wrong, or is there more to the setup of SMI?

Thanks,

Maurice


From: Frank Fock [mailto:fock at agentpp.com]
Sent: Wednesday, January 01, 2014 12:03 PM
To: Garcia, Maurice; snmp4j at agentpp.org
Subject: Re: [SNMP4J] - BER -> OID resolution i.e : snmpCommunityName

Hi Maurice,

I think the BER (Basic Encoding Rules) isn't the problem here.
The BER encodes/decodes a numeric object identifier (i.e., an
array of usinged 32bit integer values) to/from a network encoding
that is independent from the byte and word order of a system.

What you are looking for is SNMP4J-SMI which provides
OID to object (last) name conversion and index to string
conversions.

If you have SNMP4J-SMI in place, OID.toString() will provide
you the value you are looking for.

Best regards,
Frank
Am 31.12.2013 17:18, schrieb Garcia, Maurice:
Hi,

I am trying to fully resolve the snmpCommunityName OID from BER to OID

I tried using all the methods in the OID Class and can't find anything in the SMI class that can help..

Any suggestions???

Example:

I get this -> snmpCommunityName.109.116.97.112.114.111.118
But I want this -> snmpCommunityName.'mtaprov1'

Thanks,

Maurice






--

---

AGENT++

Maximilian-Kolbe-Str. 10

73257 Koengen, Germany

https://agentpp.com

Phone: +49 7024 8688230

Fax:   +49 7024 8688231



More information about the SNMP4J mailing list