diff --git a/examples/simple-global-routing.cc b/examples/simple-global-routing.cc index 64ba1d1d9..0e9652b50 100644 --- a/examples/simple-global-routing.cc +++ b/examples/simple-global-routing.cc @@ -93,9 +93,6 @@ main (int argc, char *argv[]) CommandLine cmd; cmd.Parse (argc, argv); - std::ofstream ascii; - ascii.open ("simple-global-routing.tr"); - // Here, we will explicitly create four nodes. In more sophisticated // topologies, we could configure a node factory. NS_LOG_INFO ("Create nodes."); @@ -111,8 +108,6 @@ main (int argc, char *argv[]) // We create the channels first without any IP addressing information NS_LOG_INFO ("Create channels."); PointToPointHelper p2p; - p2p.EnablePcap ("simple-global-routing.pcap"); - p2p.EnableAscii (ascii); p2p.SetChannelParameter ("BitRate", DataRate (5000000)); p2p.SetChannelParameter ("Delay", MilliSeconds (2)); NetDeviceContainer d0d2 = p2p.Build (n0n2); @@ -169,6 +164,10 @@ main (int argc, char *argv[]) apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); + std::ofstream ascii; + ascii.open ("simple-global-routing.tr"); + PointToPointHelper::EnablePcap ("simple-global-routing.pcap"); + PointToPointHelper::EnableAscii (ascii); NS_LOG_INFO ("Run Simulation."); Simulator::Run ();