Re: Problem with hexvalue



HI,

SNMP has a few base types. A base type is used in defining a
textual convention (TC). "MacAddress" is a TC using base data
type "OCTET STRING". Thus, when you get a value of an
object whose SYNTAX clause specifies "MacAddress", the
SNMP message will contain the value encoded as an
OCTET STRING. Your example below shows this.

If you want to do message decodes without the use
of MIB modules, then you will not be able to create
a "displayable version of a value" in many cases.

This is pretty basic SNMP.

PS. Please note that email address "snmpinfo@xxxxxxxxx"
is not email from domain "snmpinfo.com".

On Thu, 7 Sep 2006 snmpinfo@xxxxxxxxx wrote:
Hi,

I am developing an application which will receive the snmp packets and
decode the varbind value. My application is just decode the snmp packet
and show the varbind datatype and result. And my application doesn't
have the mib file.

For example if the incomming packet contains the varbind whose datatype
is macaddress this is encoded in 6 bytes. The tag value is 04 so I am
trying to decode the each octets and print the corresponding decimal
values.
say var bind is 04 06 30 56 57 45 ef 78 then my application print the
corresponding values of 30 , 56,57 values and not as 30 56 57 45 ef 78.


How to handle this case.

Please help out to resolve the same.

Thanks
Ravi.

cc_charles@xxxxxxxxx wrote:
The problem sounds like the manager doesn't understand the value type.
The manager uses the MIB to determine how to format return values. The
manager doesn't know that the return value is a display string (or
other type of value), therefore the manager is formatting the return
value as a hex string.

Try defining the value as a "DisplayString" (or some other type) in the
manager side MIB, and recompile the modified MIB into the management
program. Avoid using the OCTETSTRING type for MIB objects unless you
want back a string of hex values.

This should work.

snmpinfo@xxxxxxxxx wrote:
Hi ,

I have encoded the hexvalue as OCTETSTRING and while retrieving the
value in the agent side I face that the values are junk.
Is there any BER rules . If so, please let me know the same.

Thanks in Advance.

Regards,
/david t. perkins
.



Relevant Pages

  • Re: Managing Multiple Devices?
    ... Understanding SNMP MIBs.) ... > HP-OV Network Node Manager). ... > NNM, all connected to the machine that runs my "agent" software. ... > I was under the impression that this can be done using some proxy MIB, ...
    (comp.protocols.snmp)
  • Re: Problem with hexvalue
    ... The problem sounds like the manager doesn't understand the value type. ... The manager uses the MIB to determine how to format return values. ... value as a hex string. ...
    (comp.protocols.snmp)
  • Re: find words that contains some specific letters
    ... Since the String class does not offer a perfect hash function, then assume too that the following holds hashCode== hashCode. ... Under this scenario the Hash table will place all mA* and mB* under the same bucket i.e. ... That's 16 MiB for String overhead, another 16 MiB for the Set values, another 16 MiB for Map.Entry instances, and another 16 MiB for the character data in the Strings. ... Once the hash identifies a bucket, the Map then uses equalsto distinguish between the k candidates at that bucket. ...
    (comp.lang.java.programmer)
  • Emulating a network elements SNMP activity
    ... some SNMP capabilities of network elements on an IP network. ... The ideal way would of course be to parse and load the pertinent MIB ... e.g. Adventnet's parser to a wide variety of MIB files? ...
    (comp.protocols.snmp)
  • Re: Integrating the MIB to the vxworks image
    ... its responding with "Snmp No SUch Object" ... you have an existing SNMP agent + custom MIB that you can ... issue SNMP Get/Set requests against and that is working? ...
    (comp.protocols.snmp)