Search code examples
snmp

Octet String in SNMP has a value 8?


Hi I have a packet capture from wireshark .

I have opened the file and saw the below output in variable bindings.

Object Name: .1.3.6.1.4.1.193.183.4.1.4.5.1.8(iso.3.6.1.4.1.193.183.4.1.4.5.1.8) Value(Octect String ) : 353038

Can I find the integer value of the octect string ?

Octect string and Octal value mean the same ? If so , can a octal value contain 8 in 353038 .. ?

Please guide how do I know the integer value of the octect string : 353038


Solution

  • Octet strings are defined as OCTET STRING in ASN.1 and SNMP. There is nothing called "Octect String". Meanwhile, octet strings have little relationship with the octal numeric system.

    When you see 353038 is as an octet string, it simply means on the wire an SNMP packet have arrived, and it contains a string of ASCII characters "3", "5", "3", "0", "3", and "8". It is a string by nature, and does not necessarily need to be an integer (unless the definition of .1.3.6.1.4.1.193.183.4.1.4.5.1.8 in the corresponding MIB document mandates that fact).

    Most of your questions above are invalid, as you misunderstood the concept of octet strings. But if the object definition does indicate the string to represent an integer, you can always convert the string received to an integer. Most programming languages support that kind of conversion.