examples: Set wifi data link type when PCAP file is generated

This commit is contained in:
Sébastien Deronne
2021-04-17 12:16:02 +02:00
parent db97b88195
commit e353bafa48
16 changed files with 12 additions and 8 deletions

View File

@@ -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);

View File

@@ -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)