Ethereal-dev: Re: [ethereal-dev] control field in v120 dissector

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

From: Olivier Abad <abad@xxxxxxxxxxxxx>
Date: Wed, 15 Mar 2000 23:52:42 +0100
On mer, mar 15, 2000 at 12:01:15 -0800, Guy Harris wrote:
> > I just checked in a change for the lapb dissector : the type of the
> > control field is now FT_UINT8.
> > All dissectors using dissect_xdlc_control should use an integer type for
> > the control field.
> > 
> > This is not the case in v120. The type of the control field is
> > FT_STRING, and the length of the field seems to be variable (8 or 16
> > bits).
> 
> Would this be an issue of "basic" vs. "extended" mode (mod 7 vs. mod 128
> sequence numbers)?

Yes.

> If so, perhaps we need a way to have what amounts to variable-length
> numeric fields (limited to, say, 1 to 4 bytes, or 1 to 8 bytes if we
> decide to support only platforms where the compiler supports a 64-bit
> integral data type).

It could be useful. The other solution would be to consider "basic" and
"extended" modes as two different protocols, and register the fields for
each protocol with the correct length.

However, if the URL I gave is right, v120 uses basic mode only. I don't
know why the dissector makes a distinction. Bert, can you explain this ?

Olivier
-- 
One man's constant is another man's variable.
		-- A.J. Perlis