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 http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum
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.
Created attachment 1063 [details] minimal patch 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. changeset: 7012:67ca195ea166