fix tracing
authorTom Henderson <tomh@tomh.org>
Fri, 27 Jul 2007 14:54:41 -0700
changeset 991e05514a93564
parent 990 44a604ad18cc
child 992 37953a86a975
fix tracing
examples/csma-cd-one-subnet.cc
     1.1 --- a/examples/csma-cd-one-subnet.cc	Fri Jul 27 14:43:56 2007 -0700
     1.2 +++ b/examples/csma-cd-one-subnet.cc	Fri Jul 27 14:54:41 2007 -0700
     1.3 @@ -71,10 +71,10 @@
     1.4  
     1.5    // Users may find it convenient to turn on explicit debugging
     1.6    // for selected modules; the below lines suggest how to do this
     1.7 +#if 0 
     1.8    DebugComponentEnable("CsmaCdNetDevice");
     1.9    DebugComponentEnable("Ipv4L3Protocol");
    1.10    DebugComponentEnable("NetDevice");
    1.11 -#if 0 
    1.12    DebugComponentEnable("Channel");
    1.13    DebugComponentEnable("CsmaCdChannel");
    1.14    DebugComponentEnable("PacketSocket");
    1.15 @@ -126,7 +126,6 @@
    1.16    CsmaCdIpv4Topology::AddIpv4Address (
    1.17        n3, n3ifIndex, Ipv4Address("10.1.1.4"), Ipv4Mask("255.255.255.0"));
    1.18  
    1.19 -
    1.20    // Create the OnOff application to send UDP datagrams of size
    1.21    // 210 bytes at a rate of 448 Kb/s
    1.22    // from n0 to n1
    1.23 @@ -155,9 +154,17 @@
    1.24   
    1.25    // Configure tracing of all enqueue, dequeue, and NetDevice receive events
    1.26    // Trace output will be sent to the csma-cd-one-subnet.tr file
    1.27 - // AsciiTrace asciitrace ("csma-cd-one-subnet.tr");
    1.28 -//  asciitrace.TraceAllNetDeviceRx ();
    1.29 -  //  asciitrace.TraceAllQueues ();
    1.30 +  AsciiTrace asciitrace ("csma-cd-one-subnet.tr");
    1.31 +  asciitrace.TraceAllNetDeviceRx ();
    1.32 +  asciitrace.TraceAllQueues ();
    1.33 +
    1.34 +  // Also configure some tcpdump traces; each interface will be traced
    1.35 +  // The output files will be named 
    1.36 +  // simple-point-to-point.pcap-<nodeId>-<interfaceId>
    1.37 +  // and can be read by the "tcpdump -r" command (use "-tt" option to
    1.38 +  // display timestamps correctly)
    1.39 +  PcapTrace pcaptrace ("csma-cd-one-subnet.pcap");
    1.40 +  pcaptrace.TraceAllIp ();
    1.41  
    1.42    Simulator::Run ();
    1.43