Enable enqueue/dequeue tracing for point-to-point links
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user