From 20726f8201eee14537fe4d5ff9a5f1eee547dbf6 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 30 Mar 2008 21:12:02 -0700 Subject: [PATCH] move csma-multicast to new tracing helpers --- examples/csma-multicast.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/csma-multicast.cc b/examples/csma-multicast.cc index 0a756f6ce..6ea56a214 100644 --- a/examples/csma-multicast.cc +++ b/examples/csma-multicast.cc @@ -29,12 +29,12 @@ // - Nodes n0, n1, n2, n3, and n4 receive the multicast frame. // - Node n4 listens for the data +#include +#include + #include "ns3/core-module.h" #include "ns3/helper-module.h" #include "ns3/simulator-module.h" -#include "ns3/ascii-trace.h" -#include "ns3/pcap-trace.h" - using namespace ns3; @@ -160,21 +160,20 @@ main (int argc, char *argv[]) // // Configure tracing of all enqueue, dequeue, and NetDevice receive events. - // Trace output will be sent to the file "csma-multicast.tr" - // NS_LOG_INFO ("Configure Tracing."); - AsciiTrace asciitrace ("csma-multicast.tr"); - asciitrace.TraceAllNetDeviceRx (); - asciitrace.TraceAllQueues (); // + // Ascii trace output will be sent to the file "csma-multicast.tr" + // + std::ofstream ascii; + ascii.open ("csma-multicast.tr"); + CsmaHelper::EnableAscii (ascii); + // Also configure some tcpdump traces; each interface will be traced. // The output files will be named: // csma-multicast.pcap-- // and can be read by the "tcpdump -r" command (use "-tt" option to // display timestamps correctly) - // - PcapTrace pcaptrace ("csma-multicast.pcap"); - pcaptrace.TraceAllIp (); + CsmaHelper::EnablePcap ("csma-multicast.pcap"); // // Now, do the actual simulation. //