Ethereal-dev: Re: [Ethereal-dev] IrDA dissector plugin

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 18 Jan 2004 00:44:23 -0800
On Wed, Jan 07, 2004 at 11:52:26AM -0800, Jean Tourrilhes wrote:
> 	Well, it might be a case where the API/semantic of the
> function would become so complex that the benefit of merging the code
> would not pan out, because you would not actually reduce the
> maintainance overhead.

85 lines removed from "packet-irda.c", 44 lines removed from "xdlc.c",
and 51 lines added to "xdlc.h" (the latter two involve moving some
#defines to "xdlc.h") as a result of the change.  The API isn't much
more complicated - you have to pass a table of pointers to hf_ values
for subfields of the control field (which also means that the rest of
the dissectors using it have to add those fields - but that also means
you can filter on those fields, e.g. asking for all XID frames).

In the process of doing that, I noticed that the code to set the address
columns was treating source and destination addresses as little-endian
but the code to put them into the protocol tree treated them as
big-endian.  The code now treats them as little-endian in both places.