Ethereal-users: [Ethereal-users] Re: SNMP octet-strings with non-text data not displayed properl

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Wes Hardaker <wjhns36@xxxxxxxxxxxxx>
Date: Wed, 17 Dec 2003 10:15:07 -0800
>>>>> On Tue, 16 Dec 2003 12:16:20 -0800, Guy Harris <guy@xxxxxxxxxxxx> said:

>> We often trace SNMP packets and have seen that "OCTET STRINGS" that
>> contains non-readable data (array of bytes) not are displayed
>> proberly (not only in 0.10.0).
...
Guy> 2) somehow force Net-SNMP to do the right thing.

If you are using Net-SNMP routines to print the values, then it should
do the right thing.  Net-SNMP uses isprint() (thus check your language
settings) to decide if something is printable or not.  If not, it
"should" do the right thing.

However, I do *not* know what ethereal uses internally and haven't
checked.

>> Also I noticed that OID indices sometimes are displayed in a strange
>> way (near EOL):
>> Object identifier 1: 1.3.6.1.2.1.10.94.1.1.14.1.14.500001
>> (ADSL-LINE-MIB::adslAtucChanConfInterleaveMaxTxRate.'.') <= what
>> does "'.'" mean?
>> Object identifier 3: 1.3.6.1.2.1.10.94.1.1.2.1.2.500001
>> (ADSL-LINE-MIB::adslAtucInvVendorID.500001) <= OK

Guy> Again, that's done by Net-SNMP, not by Ethereal, so you'd have to
Guy> see why Net-SNMP is doing that.

Net-SNMP translates OIDs into more human readable strings by default.
OIDs contain strings encoded in them for some tables, for example.  In
this case the string is a single character of a fixed-width encoding
(if it had been a variable length string, the quotes would have been
"" quotes).  The . means it was either a real '.' character or more
likely it was an unprintable character.

Note that you can configure your snmp.conf file such that ethereal
should automatically pick up the format you want.  See the snmp.conf
manual page on oidOutputFormat and the snmpcmd manual page on the -O
flag.

snippit:

       oidOutputFormat (1|2|3|4|5|6)
              Maps -O options as follow: -Os=1, -OS=2,  -Of=3,  -On=4,  -Ou=5.
              The value 6 has no matching -O option. It suppresses output.

-- 
Wes Hardaker
Sparta