Ethereal-dev: Re: [Ethereal-dev] Patches for WAP Support

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 19 Oct 2000 00:50:32 -0700
On Thu, Oct 19, 2000 at 08:36:53AM +0100, Neil Hunter wrote:
> The fundamental problem is that you not only need to know the *value* that is
> present, but also the *number* of bytes used to encode it. You need the latter
> information in order to provide the highlighting of bytes,

The highlighting of bytes is done by the Ethereal core and GUI code;
nothing obliges you to pass 1, 2, or 4 as the length argument to
"proto_tree_add_uint()", so, if the routine used to extract one of those
values returns the length in bytes, you can use that as the length
argument.

> move to the next part of the PDU, etc.

The value used by the routine to extract one of those arguments can be
used for that as well.

However, a case could also be made for making the "type system" of
Ethereal arbitrarily extensible; one might, for example, want to add
types for the various forms of time/date information you can see in SMB
packets.