|
62 |
Queue::Enqueue (Ptr<Packet> p) |
62 |
Queue::Enqueue (Ptr<Packet> p) |
63 |
{ |
63 |
{ |
64 |
NS_LOG_FUNCTION (this << p); |
64 |
NS_LOG_FUNCTION (this << p); |
65 |
NS_LOG_LOGIC ("m_traceEnqueue (p)"); |
|
|
66 |
|
65 |
|
67 |
m_traceEnqueue (p); |
66 |
// |
68 |
|
67 |
// If DoEnqueue fails, Queue::Drop is called by the subclass |
|
|
68 |
// |
69 |
bool retval = DoEnqueue (p); |
69 |
bool retval = DoEnqueue (p); |
70 |
if (retval) |
70 |
if (retval) |
71 |
{ |
71 |
{ |
|
|
72 |
NS_LOG_LOGIC ("m_traceEnqueue (p)"); |
73 |
m_traceEnqueue (p); |
74 |
|
72 |
uint32_t size = p->GetSize (); |
75 |
uint32_t size = p->GetSize (); |
73 |
m_nBytes += size; |
76 |
m_nBytes += size; |
74 |
m_nTotalReceivedBytes += size; |
77 |
m_nTotalReceivedBytes += size; |
|
95 |
m_nPackets--; |
98 |
m_nPackets--; |
96 |
|
99 |
|
97 |
NS_LOG_LOGIC("m_traceDequeue (packet)"); |
100 |
NS_LOG_LOGIC("m_traceDequeue (packet)"); |
98 |
|
|
|
99 |
m_traceDequeue (packet); |
101 |
m_traceDequeue (packet); |
100 |
} |
102 |
} |
101 |
return packet; |
103 |
return packet; |