Bugzilla – Bug 1066
Set Radiotap modulation type flags correctly
Last modified: 2011-04-10 12:39:42 EDT
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
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:
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:
I am not sure wheter this problem is still actual, after the PCAP helper refactoring and the recent module refactoring.
Created attachment 1063 [details]
Here is a minimal patch that should fix the problem without changing the PcapSniff API.
Created attachment 1064 [details]
corrected minimal patch
whoops I forgot the TX and RX events are separate
I did some tests and the new proposed patch works correctly, hence I pushed it.