pcap for wifi side of ap

main
EmaMaker 2023-12-30 11:56:02 +00:00
parent b6e9f26113
commit c0401936b0
1 changed files with 4 additions and 3 deletions

View File

@ -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 ----- */