Ethereal-dev: Re: [Ethereal-dev] Swapped Frame Control bytes under lwapp

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: Wed, 24 Sep 2003 16:39:47 -0700

On Sep 24, 2003, at 4:06 PM, David Frascone wrote:

This patch adds the configurable frame control option to the LWAPP
dissector.  It used to be a preference under 802.11, but that didn't
make sense, since it only happens when radios send packets under lwapp.

Checked in, with C++ comments turned into C comments (see the "Portability" section of "doc/README.developer"), and with:

Now the LWAPP dissector calls dissect_80211_common directly, and another
boolean option has been added to it to swap the frame control word.

...packet-80211.c exporting a "wlan_bsfc" dissector and with the LWAPP dissector calling it or the "wlan" dissector, through handles, depending on the setting of that preference.

(Calling dissectors through handles could allow future changes, e.g. an option to stop dissection at a particular protocol, to be done in a central place.

That also gets rid of the declaration of "dissect_80211_common()" in "packet-lwapp.c" - putting declarations of functions defined elsewhere inside ".c" files, rather than in ".h" files included by the defining ".c" file and the ".c" files that use it, is a Bad Idea, as it removes checks to make sure the calls match the signature of the function....)