Ethereal-dev: Re: [ethereal-dev] packet-snmp.c patch to handle zero length context names

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

From: Jochen Friedrich <jochen@xxxxxxxx>
Date: Thu, 29 Jun 2000 15:29:49 +0200 (CEST)
On Thu, 29 Jun 2000, Juergen Schoenwaelder wrote:

> Guy> And if it contains '\0', does that mean it's not intended to be
> Guy> human-readable?
> 
> It can be human readable - but it does not have to. This also applies
> to SNMPv1/SNMPv2c community strings. They usually contain human
> readable characters - but they do not have to. (In fact, SNMPv2u (RFC
> 1910) did put binary data into the community string.)

There are several examples on where an OCTET STRING is used for any kind
of binary data. One example is the stackUnitSummary variable in the
A3COM0017-STACK-CONFIG MIB i recently posted in the "SNMP Bug 
Report" thread. In this example, the content of the OCTET STRING is yet
another ASN.1 formatted sequence.

> Guy> If it's sometimes but not always intended to be human-readable,
> Guy> perhaps we should check whether all the octets in it correspond
> Guy> to printable characters and, if they're not all printable
> Guy> characters, display it as hex, otherwise display it as text.
> 
> Yes.

Definitely.

Cheers,
Jochen