1.1 --- a/examples/csma-one-subnet.cc Tue Sep 23 16:31:54 2008 -0700
1.2 +++ b/examples/csma-one-subnet.cc Tue Sep 23 16:38:51 2008 -0700
1.3 @@ -103,19 +103,21 @@
1.4 // Create an optional packet sink to receive these packets
1.5 PacketSinkHelper sink ("ns3::UdpSocketFactory",
1.6 Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
1.7 - sink.Install (nodes.Get (1));
1.8 + app = sink.Install (nodes.Get (1));
1.9 + app.Start (Seconds (0.0));
1.10
1.11 //
1.12 // Create a similar flow from n3 to n0, starting at time 1.1 seconds
1.13 //
1.14 onoff.SetAttribute ("Remote",
1.15 AddressValue (InetSocketAddress (interfaces.GetAddress (0), port)));
1.16 - ApplicationContainer app2 = onoff.Install (nodes.Get (3));
1.17 + app = onoff.Install (nodes.Get (3));
1.18 + app.Start(Seconds (1.1));
1.19 + app.Stop (Seconds (10.0));
1.20
1.21 - sink.Install (nodes.Get (0));
1.22 + app = sink.Install (nodes.Get (0));
1.23 + app.Start (Seconds (0.0));
1.24
1.25 - app2.Start(Seconds (1.1));
1.26 - app2.Stop (Seconds (10.0));
1.27 //
1.28 // Configure tracing of all enqueue, dequeue, and NetDevice receive events.
1.29 // Trace output will be sent to the file "csma-one-subnet.tr"