From c0401936b05ca7e0f747e2d4cf938808c2b4a434 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Sat, 30 Dec 2023 11:56:02 +0000 Subject: [PATCH] pcap for wifi side of ap --- scratch/task_2001600.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scratch/task_2001600.cc b/scratch/task_2001600.cc index 4d982fbdb..d7ed8c53d 100644 --- a/scratch/task_2001600.cc +++ b/scratch/task_2001600.cc @@ -189,9 +189,9 @@ int main(int argc, char* argv[]) mac.SetType("ns3::StaWifiMac", "Ssid", SsidValue(ssid), "ActiveProbing", BooleanValue(false)); staDevices = wifi.Install(phy, mac, wifiStaNodes); // AP - NetDeviceContainer apDevices; + NetDeviceContainer apDevice; mac.SetType("ns3::ApWifiMac", "Ssid", SsidValue(ssid)); - apDevices = wifi.Install(phy, mac, wifiApNode); + apDevice = wifi.Install(phy, mac, wifiApNode); // Mobility helper MobilityHelper mobility; @@ -277,7 +277,7 @@ int main(int argc, char* argv[]) // wifi nodes address.SetBase(Ipv4Address("10.1.4.0"), "255.225.255.240"); // 10.1.9.0/28 Ipv4InterfaceContainer iStations = address.Assign(staDevices); - Ipv4InterfaceContainer iAp = address.Assign(apDevices); + Ipv4InterfaceContainer iAp = address.Assign(apDevice); // Set up Routing Table Ipv4GlobalRoutingHelper::PopulateRoutingTables(); @@ -379,6 +379,7 @@ int main(int argc, char* argv[]) ptph45.EnablePcap("task-5-subnet45", ptp45.Get(1), true); ptph35.EnablePcap("task-3-subnet35", ptp35.Get(0), true); ptph35.EnablePcap("task-5-subnet35", ptp35.Get(1), true); + phy.EnablePcap("task-9-wifi", apDevice, true); } /* ----- End of PCAP Tracing ----- */