diff --git a/examples/tutorial/third.cc b/examples/tutorial/third.cc index 3a24d2f38..75eb3e7db 100644 --- a/examples/tutorial/third.cc +++ b/examples/tutorial/third.cc @@ -173,8 +173,9 @@ main (int argc, char *argv[]) Simulator::Stop (Seconds (10.0)); - if (tracing == true) + if (tracing) { + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); pointToPoint.EnablePcapAll ("third"); phy.EnablePcap ("third", apDevices.Get (0)); csma.EnablePcap ("third", csmaDevices.Get (0), true); diff --git a/examples/tutorial/third.py b/examples/tutorial/third.py index 01903c560..fd6368aee 100644 --- a/examples/tutorial/third.py +++ b/examples/tutorial/third.py @@ -152,6 +152,7 @@ ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables() ns.core.Simulator.Stop(ns.core.Seconds(10.0)) if tracing == "True": + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); pointToPoint.EnablePcapAll ("third") phy.EnablePcap ("third", apDevices.Get (0)) csma.EnablePcap ("third", csmaDevices.Get (0), True) diff --git a/examples/wireless/mixed-wired-wireless.cc b/examples/wireless/mixed-wired-wireless.cc index efbc397f7..866a6273b 100644 --- a/examples/wireless/mixed-wired-wireless.cc +++ b/examples/wireless/mixed-wired-wireless.cc @@ -156,6 +156,7 @@ main (int argc, char *argv[]) wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate54Mbps")); YansWifiPhyHelper wifiPhy; + wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); NetDeviceContainer backboneDevices = wifi.Install (wifiPhy, mac, backbone); diff --git a/examples/wireless/mixed-wired-wireless.py b/examples/wireless/mixed-wired-wireless.py index 1225b4b98..f589eba75 100644 --- a/examples/wireless/mixed-wired-wireless.py +++ b/examples/wireless/mixed-wired-wireless.py @@ -136,6 +136,7 @@ def main(argv): wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode", ns.core.StringValue("OfdmRate54Mbps")) wifiPhy = ns.wifi.YansWifiPhyHelper() + wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); wifiChannel = ns.wifi.YansWifiChannelHelper.Default() wifiPhy.SetChannel(wifiChannel.Create()) backboneDevices = wifi.Install(wifiPhy, mac, backbone) diff --git a/examples/wireless/wifi-blockack.cc b/examples/wireless/wifi-blockack.cc index d9a3b1223..4cc9153ab 100644 --- a/examples/wireless/wifi-blockack.cc +++ b/examples/wireless/wifi-blockack.cc @@ -74,6 +74,7 @@ int main (int argc, char * argv[]) YansWifiChannelHelper channel = YansWifiChannelHelper::Default (); YansWifiPhyHelper phy; + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.SetChannel (channel.Create ()); WifiHelper wifi; diff --git a/examples/wireless/wifi-hidden-terminal.cc b/examples/wireless/wifi-hidden-terminal.cc index d418746b1..3c07620fb 100644 --- a/examples/wireless/wifi-hidden-terminal.cc +++ b/examples/wireless/wifi-hidden-terminal.cc @@ -90,6 +90,7 @@ void experiment (bool enableCtsRts, std::string wifiManager) // athstats.EnableAthstats(enableCtsRts ? "rtscts-athstats-node" : "basic-athstats-node" , nodes); // uncomment the following to have pcap output + // wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); // wifiPhy.EnablePcap (enableCtsRts ? "rtscts-pcap-node" : "basic-pcap-node" , nodes); diff --git a/examples/wireless/wifi-mixed-network.cc b/examples/wireless/wifi-mixed-network.cc index 498843931..4791f792b 100644 --- a/examples/wireless/wifi-mixed-network.cc +++ b/examples/wireless/wifi-mixed-network.cc @@ -140,7 +140,6 @@ Experiment::Run (Parameters params) channel.AddPropagationLoss ("ns3::RangePropagationLossModel"); YansWifiPhyHelper phy; - phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.SetChannel (channel.Create ()); WifiHelper wifi; diff --git a/examples/wireless/wifi-multirate.cc b/examples/wireless/wifi-multirate.cc index 9449e6c3e..b021efea1 100644 --- a/examples/wireless/wifi-multirate.cc +++ b/examples/wireless/wifi-multirate.cc @@ -521,6 +521,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, if (enablePcap) { + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.EnablePcapAll (GetOutputFileName ()); } diff --git a/examples/wireless/wifi-sleep.cc b/examples/wireless/wifi-sleep.cc index 8d2cd5f13..4842d309c 100644 --- a/examples/wireless/wifi-sleep.cc +++ b/examples/wireless/wifi-sleep.cc @@ -130,9 +130,6 @@ int main (int argc, char *argv[]) wifi.SetStandard (WIFI_STANDARD_80211b); YansWifiPhyHelper wifiPhy; - // ns-3 supports RadioTap and Prism tracing extensions for 802.11b - wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); - wifiPhy.Set ("TxPowerStart", DoubleValue (txPowerStart)); wifiPhy.Set ("TxPowerEnd", DoubleValue (txPowerEnd)); wifiPhy.Set ("TxPowerLevels", UintegerValue (nTxPowerLevels)); diff --git a/examples/wireless/wifi-spectrum-per-example.cc b/examples/wireless/wifi-spectrum-per-example.cc index 696790557..17799e3e3 100644 --- a/examples/wireless/wifi-spectrum-per-example.cc +++ b/examples/wireless/wifi-spectrum-per-example.cc @@ -492,6 +492,7 @@ int main (int argc, char *argv[]) if (enablePcap) { + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); std::stringstream ss; ss << "wifi-spectrum-per-example-" << i; phy.EnablePcap (ss.str (), apDevice); diff --git a/examples/wireless/wifi-spectrum-per-interference.cc b/examples/wireless/wifi-spectrum-per-interference.cc index 9cbc69077..d88e29c1c 100644 --- a/examples/wireless/wifi-spectrum-per-interference.cc +++ b/examples/wireless/wifi-spectrum-per-interference.cc @@ -557,6 +557,7 @@ int main (int argc, char *argv[]) if (enablePcap) { + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); std::stringstream ss; ss << "wifi-spectrum-per-example-" << i; phy.EnablePcap (ss.str (), apDevice); diff --git a/examples/wireless/wifi-spectrum-saturation-example.cc b/examples/wireless/wifi-spectrum-saturation-example.cc index f938b4876..27f661544 100644 --- a/examples/wireless/wifi-spectrum-saturation-example.cc +++ b/examples/wireless/wifi-spectrum-saturation-example.cc @@ -648,6 +648,7 @@ int main (int argc, char *argv[]) if (enablePcap) { + phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); std::stringstream ss; ss << "wifi-spectrum-saturation-example-" << i; phy.EnablePcap (ss.str (), apDevice); diff --git a/src/test/ns3wifi/wifi-issue-211-test-suite.cc b/src/test/ns3wifi/wifi-issue-211-test-suite.cc index 27706614f..ec044c3b6 100644 --- a/src/test/ns3wifi/wifi-issue-211-test-suite.cc +++ b/src/test/ns3wifi/wifi-issue-211-test-suite.cc @@ -125,7 +125,6 @@ Issue211Test::DoRun (void) spectrumChannel->SetPropagationDelayModel (delayModel); SpectrumWifiPhyHelper phy; - phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.SetChannel (spectrumChannel); WifiHelper wifi; diff --git a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc index e3164386a..1748732eb 100644 --- a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc +++ b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc @@ -150,6 +150,7 @@ WifiMsduAggregatorThroughputTest::DoRun (void) // Enable tracing at the AP if (m_writeResults) { + wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); wifiPhy.EnablePcap ("wifi-amsdu-throughput", sta.Get (0)->GetId (), 0); } diff --git a/src/wifi/test/wifi-primary-channels-test.cc b/src/wifi/test/wifi-primary-channels-test.cc index 030ab9461..55039df94 100644 --- a/src/wifi/test/wifi-primary-channels-test.cc +++ b/src/wifi/test/wifi-primary-channels-test.cc @@ -353,7 +353,6 @@ WifiPrimaryChannelsTest::DoSetup (void) spectrumChannel->SetPropagationDelayModel (delayModel); SpectrumWifiPhyHelper phy; - phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.SetChannel (spectrumChannel); phy.Set ("Frequency", UintegerValue (frequency)); // same frequency for all BSSes diff --git a/src/wifi/test/wifi-txop.cc b/src/wifi/test/wifi-txop.cc index eed036986..f62955e00 100644 --- a/src/wifi/test/wifi-txop.cc +++ b/src/wifi/test/wifi-txop.cc @@ -164,7 +164,6 @@ WifiTxopTest::DoRun (void) spectrumChannel->SetPropagationDelayModel (delayModel); SpectrumWifiPhyHelper phy; - phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); phy.SetChannel (spectrumChannel); Config::SetDefault ("ns3::QosFrameExchangeManager::PifsRecovery", BooleanValue (m_pifsRecovery));