From 1912ddacfd085350164002b0df87229d23177653 Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Wed, 27 Jan 2010 12:15:30 -0800 Subject: [PATCH] rearrange trace code in sixth.cc for clarity --- examples/tutorial/sixth.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/tutorial/sixth.cc b/examples/tutorial/sixth.cc index 348aaead6..fc340ef31 100644 --- a/examples/tutorial/sixth.cc +++ b/examples/tutorial/sixth.cc @@ -210,16 +210,16 @@ main (int argc, char *argv[]) Ptr ns3TcpSocket = Socket::CreateSocket (nodes.Get (0), TcpSocketFactory::GetTypeId ()); - AsciiTraceHelper asciiTraceHelper; - Ptr stream = asciiTraceHelper.CreateFileStream ("sixth.cwnd"); - ns3TcpSocket->TraceConnectWithoutContext ("CongestionWindow", MakeBoundCallback (&CwndChange, stream)); - Ptr app = CreateObject (); app->Setup (ns3TcpSocket, sinkAddress, 1040, 1000, DataRate ("1Mbps")); nodes.Get (0)->AddApplication (app); app->SetStartTime (Seconds (1.)); app->SetStopTime (Seconds (20.)); + AsciiTraceHelper asciiTraceHelper; + Ptr stream = asciiTraceHelper.CreateFileStream ("sixth.cwnd"); + ns3TcpSocket->TraceConnectWithoutContext ("CongestionWindow", MakeBoundCallback (&CwndChange, stream)); + PcapHelper pcapHelper; Ptr file = pcapHelper.CreateFile ("sixth.pcap", "w", PcapHelper::DLT_PPP); devices.Get (1)->TraceConnectWithoutContext("PhyRxDrop", MakeBoundCallback (&RxDrop, file));