Bug 1066 - Set Radiotap modulation type flags correctly
Set Radiotap modulation type flags correctly
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P5 minor
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-28 06:39 EST by Dean Armstrong
Modified: 2011-04-10 12:39 EDT (History)
2 users (show)

See Also:


Attachments
minimal patch (1.42 KB, patch)
2011-04-10 12:17 EDT, Nicola Baldo
Details | Diff
corrected minimal patch (2.67 KB, patch)
2011-04-10 12:35 EDT, Nicola Baldo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Armstrong 2011-02-28 06:39:22 EST
The PromiscSnifferRx and PromiscSnifferTx trace sources on WifiPhy
objects allow generation of PCAP (with Radiotap header) traces as form
of simulation output. Unfortunately, the Radiotap flags that indicate
modulation type are not being set correctly for 802.11g devices.

Specifically, the current code in yans-wifi-helper.cc (and, for that
matter, spectrum-wifi-helper.cc) assumes that OFDM modulation (for
which there is a Radiotap flag) is used only above 2.5 GHz (i.e., at 5
GHz in the form of, e.g., 802.11a), and that "CCK" is used
elsewhere. Since 802.11g support has been added to ns-3, this is no
longer unconditionally true.

The fix I'm proposing can be seen as the sum of changesets
6820:110ddcce20bb and 6821:9be74ee020fa (which would be combined as
appropriate before any push) in
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum
Comment 1 Nicola Baldo 2011-03-01 12:07:06 EST
Thank for this contribution! Radiotap support was introduced before 802.11g support, so you're right it should be fixed.


The biggest issue I see in your proposed change is here:
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum/rev/110ddcce20bb

I see that you replaced the PHY rate with a WifiMode. The current design was chosen to avoid introducing a dependency on the wifi module:
http://groups.google.com/group/ns-3-reviews/browse_thread/thread/7e59007015ac4fa4/d5aa7dc657cd9987?lnk=gst&q=radiotap#d5aa7dc657cd9987

I am not sure wheter this problem is still actual, after the PCAP helper refactoring and the recent module refactoring.
Comment 2 Nicola Baldo 2011-04-10 12:17:45 EDT
Created attachment 1063 [details]
minimal patch

Here is a minimal patch that should fix the problem without changing the PcapSniff API.
Comment 3 Nicola Baldo 2011-04-10 12:35:02 EDT
Created attachment 1064 [details]
corrected minimal patch

whoops I forgot the TX and RX events are separate
Comment 4 Nicola Baldo 2011-04-10 12:39:42 EDT
I did some tests and the new proposed patch works correctly, hence I pushed it.

changeset:   7012:67ca195ea166