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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 apps.Start (Seconds (1.0)); | 117 apps.Start (Seconds (1.0)); |
118 apps.Stop (Seconds (10.0)); | 118 apps.Stop (Seconds (10.0)); |
119 | 119 |
120 // Create a packet sink to receive these packets | 120 // Create a packet sink to receive these packets |
121 PacketSinkHelper sink ("ns3::UdpSocketFactory", | 121 PacketSinkHelper sink ("ns3::UdpSocketFactory", |
122 Address (InetSocketAddress (Ipv4Address::GetAny (), port))); | 122 Address (InetSocketAddress (Ipv4Address::GetAny (), port))); |
123 apps = sink.Install (nC); | 123 apps = sink.Install (nC); |
124 apps.Start (Seconds (1.0)); | 124 apps.Start (Seconds (1.0)); |
125 apps.Stop (Seconds (10.0)); | 125 apps.Stop (Seconds (10.0)); |
126 | 126 |
127 std::ofstream ascii; | 127 AsciiTraceHelper ascii; |
128 ascii.open ("static-routing-slash32.tr"); | 128 p2p.EnableAsciiAll (ascii.CreateFileStream ("static-routing-slash32.tr")); |
129 PointToPointHelper::EnablePcapAll ("static-routing-slash32"); | 129 p2p.EnablePcapAll ("static-routing-slash32"); |
130 PointToPointHelper::EnableAsciiAll (ascii); | |
131 | 130 |
132 Simulator::Run (); | 131 Simulator::Run (); |
133 Simulator::Destroy (); | 132 Simulator::Destroy (); |
134 | 133 |
135 return 0; | 134 return 0; |
136 } | 135 } |
OLD | NEW |