Ethereal-dev: Re: [Ethereal-dev] Patch for x25 over TCP dissector (RFC 1613)

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: Sat, 16 Dec 2000 23:45:59 -0800
On Sat, Dec 16, 2000 at 11:39:19PM -0800, Guy Harris wrote:
> you *can*, in fact, see that COL_INFO, if the X.25 dissector has been
> disabled, so I un-commented that code (and moved the fetch of "version"
> and "len" before it).

This brings up a question.

The X.25 dissector doesn't call "CHECK_DISPLAY_AS_DATA()" until after
it's set the Protocol column, so even if you disable the X.25 dissector,
it still puts "X.25" into the Protocol column.

It does that because there are two separate protocols registered by the
X.25 dissector - one for 3-bit sequence numbers and one for 7-bit
sequence numbers.

That adds a bit of complication - for one thing, there's no single X.25
protocol to be disabled, there are two of them, even though they share a
dissector.

It might be nice to have only one protocol, but one problem here is that
some fields in the X.25 dissector are bitfields, and the bitfields have
different bitmasks depending on the size of the sequence number; we have
separate "x25.p_r" and "ex25.p_r" fields, the former for 3-bit sequence
numbers and the latter for 7-bit sequence numbers, for example.

Ideally, we might want to have one field that happens to be 3 bits
sometimes and 7 bits other times; we currently don't have any mechanisms
to support that, however.