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: Neil Hunter <neil.hunter@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Oct 2000 08:36:53 +0100 (BST)
On Thu, 19 Oct 2000, Guy Harris wrote:

> It introduces a new field type, FT_UINTVAR, which is a "Variable length
> UINT"; that type appears to be a sequence of octets, with the last octet
> not having the topmost bit set, with the value built by assembling the
> lower 7 bits of each octet into a bit string.

Ooops, yep - should have mentioned that. I got all giddy with finally getting
the code into a position to release!

The UINTVAR type is described in the WTP and WSP specs, but basically it is as
above.

> This is, I think, also the encoding of ASN.1 tag values - but it's still
> somewhat specialized.  Should we add a new type for this, or should we
> just treat it as FT_UINT32, but have the a routine in the WAP dissector
> extract the value and then use "proto_tree_add_uint()" to add an entry
> with the extracted value rather than using "proto_tree_add_item()"?

I don't know about the ASN.1 tag values, but if the opinion is that it is too
specific I can always move the function out of the tv_buff code and into the
WAP code.

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, move to the next
part of the PDU, etc.

I originally had support for this datatype in the WAP code, but decided to keep
the tvbuff routines together in one place.

Cheers,
  Neil

-------------------------------------------------------------------------------
  Neil Hunter                                     Tel:    +44 (0)113 207 6073
  Internet Systems Developer                      Fax:    +44 (0)113 234 6065
  Energis Squared                                 Mobile: +44 (0)7787 100 649
  http://www.energis-squared.com/
                    ---------------------------------------
  This email is confidential and may be privileged. If you are not the named
  recipient please notify the sender immediately and do not disclose to
  another person or use it and take copies. If you receive this message in
  error please call the switchboard on + 44 (0)113 234 5100.
-------------------------------------------------------------------------------