Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] tvbuff questions and conclusions...

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: Wed, 14 Mar 2001 20:58:25 -0800
On Tue, Mar 13, 2001 at 01:44:51PM -0800, Guy Harris wrote:
> If that code correctly handles that part of IEEE 802.11, then
> "tag_data_ptr[i]" is a 7-bit number, giving the supported rate in units
> of 1/2Mbit/sec, plus an 8th bit at the top, which the dissector doesn't
> dissect.

>From IEEE Std 802.11-1997:

	7.3.2.2 Supported Rates element

	The Supported Rates element specifies all the rates that this
	STA is capable of receiving.  The information field is encoded
	as 1 to 8 octets where each octet describes a single supported
	rate in units of 500 kbit/s.

	Within Beacon, Probe Response, Association Response, and
	Reassociation Response management frames, each supported rate
	belonging to the BSSBasicRateSet as defined in 10.3.10.1, is
	encoded as an octet with the msb (bit 7) set to 1 (e.g., a
	1Mbit/s rate belonging to the BSSBasicRateSet is encoded as
	X'82').  Rates not belonging to the BSSBasicRateSet are encoded
	with the msb set to 0 (e.g., a 2Mbit/s rate not belonging to the
	BSSBasicRate Set is encoded as X'04').  The msb of each
	Supported Rate octet in other management frame types is ignored
	by receiving STAs.

So masking out the uppermost bit by ANDing with 0x7F is the right thing
to do to get the rate; for some frames, we might also want to indicate
whether the rate belongs to the BSSBasicRateSet or not.