OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 ip.SetBase ("192.168.0.0", "255.255.255.0"); | 83 ip.SetBase ("192.168.0.0", "255.255.255.0"); |
84 | 84 |
85 backboneNodes.Create (nWifis); | 85 backboneNodes.Create (nWifis); |
86 stack.Install (backboneNodes); | 86 stack.Install (backboneNodes); |
87 | 87 |
88 backboneDevices = csma.Install (backboneNodes); | 88 backboneDevices = csma.Install (backboneNodes); |
89 | 89 |
90 double wifiX = 0.0; | 90 double wifiX = 0.0; |
91 | 91 |
92 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); | 92 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); |
93 wifiPhy.SetPcapFormat(YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); | 93 wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); |
94 | 94 |
95 for (uint32_t i = 0; i < nWifis; ++i) | 95 for (uint32_t i = 0; i < nWifis; ++i) |
96 { | 96 { |
97 // calculate ssid for wifi subnetwork | 97 // calculate ssid for wifi subnetwork |
98 std::ostringstream oss; | 98 std::ostringstream oss; |
99 oss << "wifi-default-" << i; | 99 oss << "wifi-default-" << i; |
100 Ssid ssid = Ssid (oss.str ()); | 100 Ssid ssid = Ssid (oss.str ()); |
101 | 101 |
102 NodeContainer sta; | 102 NodeContainer sta; |
103 NetDeviceContainer staDev; | 103 NetDeviceContainer staDev; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 wifiPhy.EnablePcap ("wifi-wired-bridging", apDevices[1]); | 188 wifiPhy.EnablePcap ("wifi-wired-bridging", apDevices[1]); |
189 | 189 |
190 std::ofstream os; | 190 std::ofstream os; |
191 os.open ("wifi-wired-bridging.mob"); | 191 os.open ("wifi-wired-bridging.mob"); |
192 MobilityHelper::EnableAsciiAll (os); | 192 MobilityHelper::EnableAsciiAll (os); |
193 | 193 |
194 Simulator::Stop (Seconds (100.0)); | 194 Simulator::Stop (Seconds (100.0)); |
195 Simulator::Run (); | 195 Simulator::Run (); |
196 Simulator::Destroy (); | 196 Simulator::Destroy (); |
197 } | 197 } |
OLD | NEW |