From 4351e87bc1640c42df9d74b522f6908d2bc70f95 Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Mon, 25 Jan 2010 16:12:16 -0800 Subject: [PATCH] DLT_PPP for sixth dropped packets --- examples/tutorial/sixth.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/tutorial/sixth.cc b/examples/tutorial/sixth.cc index 4d944a97e..348aaead6 100644 --- a/examples/tutorial/sixth.cc +++ b/examples/tutorial/sixth.cc @@ -165,12 +165,14 @@ MyApp::ScheduleTx (void) static void CwndChange (Ptr stream, uint32_t oldCwnd, uint32_t newCwnd) { + NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" << newCwnd); *stream->GetStream () << Simulator::Now ().GetSeconds () << "\t" << oldCwnd << "\t" << newCwnd << std::endl; } static void RxDrop (Ptr file, Ptr p) { + NS_LOG_UNCOND ("RxDrop at " << Simulator::Now ().GetSeconds ()); file->Write(Simulator::Now(), p); } @@ -219,7 +221,7 @@ main (int argc, char *argv[]) app->SetStopTime (Seconds (20.)); PcapHelper pcapHelper; - Ptr file = pcapHelper.CreateFile ("sixth.pcap", "w", PcapHelper::DLT_EN10MB); + Ptr file = pcapHelper.CreateFile ("sixth.pcap", "w", PcapHelper::DLT_PPP); devices.Get (1)->TraceConnectWithoutContext("PhyRxDrop", MakeBoundCallback (&RxDrop, file)); Simulator::Stop (Seconds(20));