Enable enqueue/dequeue tracing for point-to-point links

This commit is contained in:
Tom Henderson
2007-09-14 14:42:31 -07:00
parent 8649c899db
commit 9ef345f02d
3 changed files with 8 additions and 2 deletions

View File

@@ -63,6 +63,9 @@ main (int argc, char *argv[])
// Users may find it convenient to turn on explicit debugging
// for selected modules; the below lines suggest how to do this
//
NS_LOG_ALL("");
#if 0
LogComponentEnable ("CsmaMulticastExample", LOG_LEVEL_INFO);

View File

@@ -214,8 +214,8 @@ main (int argc, char *argv[])
// Trace output will be sent to the simple-point-to-point.tr file
NS_LOG_INFO ("Configure Tracing.");
AsciiTrace asciitrace ("simple-point-to-point.tr");
asciitrace.TraceAllQueues ();
asciitrace.TraceAllNetDeviceRx ();
asciitrace.TraceAllQueues ();
// Also configure some tcpdump traces; each interface will be traced
// The output files will be named

View File

@@ -156,9 +156,12 @@ bool PointToPointNetDevice::SendTo (const Packet& packet, const Address& dest,
//
//
// If there's a transmission in progress, we enque the packet for later
// trnsmission; otherwise we send it now.
// transmission; otherwise we send it now.
if (m_txMachineState == READY)
{
// We still enqueue and dequeue it to hit the tracing hooks
m_queue->Enqueue (p);
m_queue->Dequeue (p);
return TransmitStart (p);
}
else