examples/csma-ping.cc
changeset 4264 9d2e96c4e6e4
parent 4225 f1d873a81159
child 4616 a84f60b6cd12
equal deleted inserted replaced
4263:fec2f830d015 4264:9d2e96c4e6e4
   115   apps = ping.Install (pingers);
   115   apps = ping.Install (pingers);
   116   apps.Start (Seconds (2.0));
   116   apps.Start (Seconds (2.0));
   117   apps.Stop (Seconds (5.0));
   117   apps.Stop (Seconds (5.0));
   118 
   118 
   119   NS_LOG_INFO ("Configure Tracing.");
   119   NS_LOG_INFO ("Configure Tracing.");
   120   // first, pcap tracing.
   120   // first, pcap tracing in non-promiscuous mode
   121   csma.EnablePcapAll ("csma-ping");
   121   csma.EnablePcapAll ("csma-ping", false);
       
   122 
   122   // then, print what the packet sink receives.
   123   // then, print what the packet sink receives.
   123   Config::ConnectWithoutContext ("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", 
   124   Config::ConnectWithoutContext ("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", 
   124                                  MakeCallback (&SinkRx));
   125                                  MakeCallback (&SinkRx));
   125   // finally, print the ping rtts.
   126   // finally, print the ping rtts.
   126   Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::V4Ping/Rtt",
   127   Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::V4Ping/Rtt",