A Discrete-Event Network Simulator
API
codel-queue-disc.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 Andrew McGregor
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Codel, the COntrolled DELay Queueing discipline
19  * Based on ns2 simulation code presented by Kathie Nichols
20  *
21  * This port based on linux kernel code by
22  * Authors: Dave Täht <d@taht.net>
23  * Eric Dumazet <edumazet@google.com>
24  *
25  * Ported to ns-3 by: Andrew McGregor <andrewmcgr@gmail.com>
26 */
27 
28 #include "ns3/log.h"
29 #include "ns3/enum.h"
30 #include "ns3/uinteger.h"
31 #include "ns3/abort.h"
32 #include "codel-queue-disc.h"
33 #include "ns3/object-factory.h"
34 #include "ns3/drop-tail-queue.h"
35 #include "ns3/net-device-queue-interface.h"
36 
37 namespace ns3 {
38 
39 NS_LOG_COMPONENT_DEFINE ("CoDelQueueDisc");
40 
48 /* borrowed from the linux kernel */
49 static inline uint32_t ReciprocalDivide (uint32_t A, uint32_t R)
50 {
51  return (uint32_t)(((uint64_t)A * R) >> 32);
52 }
53 
54 /* end kernel borrowings */
55 
60 static uint32_t CoDelGetTime (void)
61 {
62  Time time = Simulator::Now ();
63  uint64_t ns = time.GetNanoSeconds ();
64 
65  return ns >> CODEL_SHIFT;
66 }
67 
68 
69 NS_OBJECT_ENSURE_REGISTERED (CoDelQueueDisc);
70 
72 {
73  static TypeId tid = TypeId ("ns3::CoDelQueueDisc")
74  .SetParent<QueueDisc> ()
75  .SetGroupName ("TrafficControl")
76  .AddConstructor<CoDelQueueDisc> ()
77  .AddAttribute ("Mode",
78  "Whether to use Bytes (see MaxBytes) or Packets (see MaxPackets) as the maximum queue size metric.",
81  MakeEnumChecker (QUEUE_DISC_MODE_BYTES, "QUEUE_DISC_MODE_BYTES",
82  QUEUE_DISC_MODE_PACKETS, "QUEUE_DISC_MODE_PACKETS"))
83  .AddAttribute ("MaxPackets",
84  "The maximum number of packets accepted by this CoDelQueueDisc.",
87  MakeUintegerChecker<uint32_t> ())
88  .AddAttribute ("MaxBytes",
89  "The maximum number of bytes accepted by this CoDelQueueDisc.",
92  MakeUintegerChecker<uint32_t> ())
93  .AddAttribute ("MinBytes",
94  "The CoDel algorithm minbytes parameter.",
95  UintegerValue (1500),
97  MakeUintegerChecker<uint32_t> ())
98  .AddAttribute ("Interval",
99  "The CoDel algorithm interval",
100  StringValue ("100ms"),
102  MakeTimeChecker ())
103  .AddAttribute ("Target",
104  "The CoDel algorithm target queue delay",
105  StringValue ("5ms"),
107  MakeTimeChecker ())
108  .AddTraceSource ("Count",
109  "CoDel count",
111  "ns3::TracedValueCallback::Uint32")
112  .AddTraceSource ("LastCount",
113  "CoDel lastcount",
115  "ns3::TracedValueCallback::Uint32")
116  .AddTraceSource ("DropState",
117  "Dropping state",
119  "ns3::TracedValueCallback::Bool")
120  .AddTraceSource ("DropNext",
121  "Time until next packet drop",
123  "ns3::TracedValueCallback::Uint32")
124  ;
125 
126  return tid;
127 }
128 
130  : QueueDisc (),
131  m_maxBytes (),
132  m_count (0),
133  m_lastCount (0),
134  m_dropping (false),
135  m_recInvSqrt (~0U >> REC_INV_SQRT_SHIFT),
136  m_firstAboveTime (0),
137  m_dropNext (0),
138  m_state1 (0),
139  m_state2 (0),
140  m_state3 (0),
141  m_states (0)
142 {
143  NS_LOG_FUNCTION (this);
144 }
145 
147 {
148  NS_LOG_FUNCTION (this);
149 }
150 
151 void
153 {
154  NS_LOG_FUNCTION (this);
155  uint32_t invsqrt = ((uint32_t) m_recInvSqrt) << REC_INV_SQRT_SHIFT;
156  uint32_t invsqrt2 = ((uint64_t) invsqrt * invsqrt) >> 32;
157  uint64_t val = (3ll << 32) - ((uint64_t) m_count * invsqrt2);
158 
159  val >>= 2; /* avoid overflow */
160  val = (val * invsqrt) >> (32 - 2 + 1);
162 }
163 
164 uint32_t
166 {
167  NS_LOG_FUNCTION (this);
169 }
170 
171 void
173 {
174  NS_LOG_FUNCTION (mode);
175  m_mode = mode;
176 }
177 
180 {
181  NS_LOG_FUNCTION (this);
182  return m_mode;
183 }
184 
185 bool
187 {
188  NS_LOG_FUNCTION (this << item);
189 
191  {
192  NS_LOG_LOGIC ("Queue full (at max packets) -- dropping pkt");
194  return false;
195  }
196 
197  if (m_mode == QUEUE_DISC_MODE_BYTES && (GetInternalQueue (0)->GetNBytes () + item->GetSize () > m_maxBytes))
198  {
199  NS_LOG_LOGIC ("Queue full (packet would exceed max bytes) -- dropping pkt");
201  return false;
202  }
203 
204  bool retval = GetInternalQueue (0)->Enqueue (item);
205 
206  // If Queue::Enqueue fails, QueueDisc::DropBeforeEnqueue is called by the
207  // internal queue because QueueDisc::AddInternalQueue sets the trace callback
208 
209  NS_LOG_LOGIC ("Number packets " << GetInternalQueue (0)->GetNPackets ());
210  NS_LOG_LOGIC ("Number bytes " << GetInternalQueue (0)->GetNBytes ());
211 
212  return retval;
213 }
214 
215 bool
217 {
218  NS_LOG_FUNCTION (this);
219  bool okToDrop;
220 
221  if (!item)
222  {
223  m_firstAboveTime = 0;
224  return false;
225  }
226 
227  Time delta = Simulator::Now () - item->GetTimeStamp ();
228  NS_LOG_INFO ("Sojourn time " << delta.ToDouble (Time::MS) << "ms");
229  uint32_t sojournTime = Time2CoDel (delta);
230 
231  if (CoDelTimeBefore (sojournTime, Time2CoDel (m_target))
233  {
234  // went below so we'll stay below for at least q->interval
235  NS_LOG_LOGIC ("Sojourn time is below target or number of bytes in queue is less than minBytes; packet should not be dropped");
236  m_firstAboveTime = 0;
237  return false;
238  }
239  okToDrop = false;
240  if (m_firstAboveTime == 0)
241  {
242  /* just went above from below. If we stay above
243  * for at least q->interval we'll say it's ok to drop
244  */
245  NS_LOG_LOGIC ("Sojourn time has just gone above target from below, need to stay above for at least q->interval before packet can be dropped. ");
247  }
248  else if (CoDelTimeAfter (now, m_firstAboveTime))
249  {
250  NS_LOG_LOGIC ("Sojourn time has been above target for at least q->interval; it's OK to (possibly) drop packet.");
251  okToDrop = true;
252  ++m_state1;
253  }
254  return okToDrop;
255 }
256 
259 {
260  NS_LOG_FUNCTION (this);
261 
262  Ptr<QueueDiscItem> item = GetInternalQueue (0)->Dequeue ();
263  if (!item)
264  {
265  // Leave dropping state when queue is empty
266  m_dropping = false;
267  NS_LOG_LOGIC ("Queue empty");
268  return 0;
269  }
270  uint32_t now = CoDelGetTime ();
271 
272  NS_LOG_LOGIC ("Popped " << item);
273  NS_LOG_LOGIC ("Number packets remaining " << GetInternalQueue (0)->GetNPackets ());
274  NS_LOG_LOGIC ("Number bytes remaining " << GetInternalQueue (0)->GetNBytes ());
275 
276  // Determine if item should be dropped
277  bool okToDrop = OkToDrop (item, now);
278 
279  if (m_dropping)
280  { // In the dropping state (sojourn time has gone above target and hasn't come down yet)
281  // Check if we can leave the dropping state or next drop should occur
282  NS_LOG_LOGIC ("In dropping state, check if it's OK to leave or next drop should occur");
283  if (!okToDrop)
284  {
285  /* sojourn time fell below target - leave dropping state */
286  NS_LOG_LOGIC ("Sojourn time goes below target, it's OK to leave dropping state.");
287  m_dropping = false;
288  }
289  else if (CoDelTimeAfterEq (now, m_dropNext))
290  {
291  m_state2++;
292  while (m_dropping && CoDelTimeAfterEq (now, m_dropNext))
293  {
294  // It's time for the next drop. Drop the current packet and
295  // dequeue the next. The dequeue might take us out of dropping
296  // state. If not, schedule the next drop.
297  // A large amount of packets in queue might result in drop
298  // rates so high that the next drop should happen now,
299  // hence the while loop.
300  NS_LOG_LOGIC ("Sojourn time is still above target and it's time for next drop; dropping " << item);
302 
303  ++m_count;
304  NewtonStep ();
305  item = GetInternalQueue (0)->Dequeue ();
306 
307  if (item)
308  {
309  NS_LOG_LOGIC ("Popped " << item);
310  NS_LOG_LOGIC ("Number packets remaining " << GetInternalQueue (0)->GetNPackets ());
311  NS_LOG_LOGIC ("Number bytes remaining " << GetInternalQueue (0)->GetNBytes ());
312  }
313 
314  if (!OkToDrop (item, now))
315  {
316  /* leave dropping state */
317  NS_LOG_LOGIC ("Leaving dropping state");
318  m_dropping = false;
319  }
320  else
321  {
322  /* schedule the next drop */
323  NS_LOG_LOGIC ("Running ControlLaw for input m_dropNext: " << (double)m_dropNext / 1000000);
325  NS_LOG_LOGIC ("Scheduled next drop at " << (double)m_dropNext / 1000000);
326  }
327  }
328  }
329  }
330  else
331  {
332  // Not in the dropping state
333  // Decide if we have to enter the dropping state and drop the first packet
334  NS_LOG_LOGIC ("Not in dropping state; decide if we have to enter the state and drop the first packet");
335  if (okToDrop)
336  {
337  // Drop the first packet and enter dropping state unless the queue is empty
338  NS_LOG_LOGIC ("Sojourn time goes above target, dropping the first packet " << item << " and entering the dropping state");
340 
341  item = GetInternalQueue (0)->Dequeue ();
342 
343  if (item)
344  {
345  NS_LOG_LOGIC ("Popped " << item);
346  NS_LOG_LOGIC ("Number packets remaining " << GetInternalQueue (0)->GetNPackets ());
347  NS_LOG_LOGIC ("Number bytes remaining " << GetInternalQueue (0)->GetNBytes ());
348  }
349 
350  OkToDrop (item, now);
351  m_dropping = true;
352  ++m_state3;
353  /*
354  * if min went above target close to when we last went below it
355  * assume that the drop rate that controlled the queue on the
356  * last cycle is a good starting point to control it now.
357  */
358  int delta = m_count - m_lastCount;
359  if (delta > 1 && CoDelTimeBefore (now - m_dropNext, 16 * Time2CoDel (m_interval)))
360  {
361  m_count = delta;
362  NewtonStep ();
363  }
364  else
365  {
366  m_count = 1;
368  }
369  m_lastCount = m_count;
370  NS_LOG_LOGIC ("Running ControlLaw for input now: " << (double)now);
371  m_dropNext = ControlLaw (now);
372  NS_LOG_LOGIC ("Scheduled next drop at " << (double)m_dropNext / 1000000 << " now " << (double)now / 1000000);
373  }
374  }
375  ++m_states;
376  return item;
377 }
378 
379 uint32_t
381 {
382  NS_LOG_FUNCTION (this);
383  if (GetMode () == QUEUE_DISC_MODE_BYTES)
384  {
385  return GetInternalQueue (0)->GetNBytes ();
386  }
387  else if (GetMode () == QUEUE_DISC_MODE_PACKETS)
388  {
389  return GetInternalQueue (0)->GetNPackets ();
390  }
391  else
392  {
393  NS_ABORT_MSG ("Unknown mode.");
394  }
395 }
396 
397 Time
399 {
400  return m_target;
401 }
402 
403 Time
405 {
406  return m_interval;
407 }
408 
409 uint32_t
411 {
412  return m_dropNext;
413 }
414 
417 {
418  NS_LOG_FUNCTION (this);
419 
420  if (GetInternalQueue (0)->IsEmpty ())
421  {
422  NS_LOG_LOGIC ("Queue empty");
423  return 0;
424  }
425 
426  Ptr<const QueueDiscItem> item = GetInternalQueue (0)->Peek ();
427 
428  NS_LOG_LOGIC ("Number packets " << GetInternalQueue (0)->GetNPackets ());
429  NS_LOG_LOGIC ("Number bytes " << GetInternalQueue (0)->GetNBytes ());
430 
431  return item;
432 }
433 
434 bool
435 CoDelQueueDisc::CoDelTimeAfter (uint32_t a, uint32_t b)
436 {
437  return ((int)(a) - (int)(b) > 0);
438 }
439 
440 bool
441 CoDelQueueDisc::CoDelTimeAfterEq (uint32_t a, uint32_t b)
442 {
443  return ((int)(a) - (int)(b) >= 0);
444 }
445 
446 bool
447 CoDelQueueDisc::CoDelTimeBefore (uint32_t a, uint32_t b)
448 {
449  return ((int)(a) - (int)(b) < 0);
450 }
451 
452 bool
453 CoDelQueueDisc::CoDelTimeBeforeEq (uint32_t a, uint32_t b)
454 {
455  return ((int)(a) - (int)(b) <= 0);
456 }
457 
458 uint32_t
460 {
461  return (t.GetNanoSeconds () >> CODEL_SHIFT);
462 }
463 
464 bool
466 {
467  NS_LOG_FUNCTION (this);
468  if (GetNQueueDiscClasses () > 0)
469  {
470  NS_LOG_ERROR ("CoDelQueueDisc cannot have classes");
471  return false;
472  }
473 
474  if (GetNPacketFilters () > 0)
475  {
476  NS_LOG_ERROR ("CoDelQueueDisc cannot have packet filters");
477  return false;
478  }
479 
480  if (GetNInternalQueues () == 0)
481  {
482  // create a DropTail queue
483  Ptr<InternalQueue> queue = CreateObjectWithAttributes<DropTailQueue<QueueDiscItem> > ("Mode", EnumValue (m_mode));
485  {
486  queue->SetMaxPackets (m_maxPackets);
487  }
488  else
489  {
490  queue->SetMaxBytes (m_maxBytes);
491  }
492  AddInternalQueue (queue);
493  }
494 
495  if (GetNInternalQueues () != 1)
496  {
497  NS_LOG_ERROR ("CoDelQueueDisc needs 1 internal queue");
498  return false;
499  }
500 
503  {
504  NS_LOG_ERROR ("The mode of the provided queue does not match the mode set on the CoDelQueueDisc");
505  return false;
506  }
507 
508  if ((m_mode == QUEUE_DISC_MODE_PACKETS && GetInternalQueue (0)->GetMaxPackets () != m_maxPackets) ||
509  (m_mode == QUEUE_DISC_MODE_BYTES && GetInternalQueue (0)->GetMaxBytes () != m_maxBytes))
510  {
511  NS_LOG_ERROR ("The size of the internal queue differs from the queue disc limit");
512  return false;
513  }
514 
515  return true;
516 }
517 
518 void
520 {
521  NS_LOG_FUNCTION (this);
522 }
523 
524 } // namespace ns3
525 
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
virtual Ptr< const QueueDiscItem > DoPeek(void) const
This function returns a copy of the next packet the queue disc will extract.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
uint32_t GetNQueueDiscClasses(void) const
Get the number of queue disc classes.
Definition: queue-disc.cc:557
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
Add a packet to the queue.
uint32_t m_maxBytes
Max # of bytes accepted by the queue.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static constexpr const char * TARGET_EXCEEDED_DROP
Sojourn time above target.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
void DropBeforeEnqueue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped before enqueue...
Definition: queue-disc.cc:609
uint32_t m_maxPackets
Max # of packets accepted by the queue.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
Hold variables of type string.
Definition: string.h:41
uint32_t GetDropNext(void)
Get the time for next packet drop while in the dropping state.
uint32_t GetNBytes(void) const
Get the amount of bytes stored by the queue disc.
Definition: queue-disc.cc:437
TracedValue< uint32_t > m_count
Number of packets dropped since entering drop state.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: enum.h:209
static constexpr const char * OVERLIMIT_DROP
Overlimit dropped packet.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
Time GetInterval(void)
Get the interval.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
bool CoDelTimeAfterEq(uint32_t a, uint32_t b)
Check if CoDel time a is successive or equal to b.
QueueDiscMode m_mode
The operating mode (Bytes or packets)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:277
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:151
millisecond
Definition: nstime.h:115
uint32_t ControlLaw(uint32_t t)
Determine the time for next drop CoDel control law is t + m_interval/sqrt(m_count).
Use number of packets for maximum queue size.
Definition: queue.h:166
bool CoDelTimeAfter(uint32_t a, uint32_t b)
Check if CoDel time a is successive to b.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< InternalQueue > GetInternalQueue(uint32_t i) const
Get the i-th internal queue.
Definition: queue-disc.cc:492
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:446
TracedValue< bool > m_dropping
True if in dropping state.
bool OkToDrop(Ptr< QueueDiscItem > item, uint32_t now)
Determine whether a packet is OK to be dropped.
uint32_t GetNInternalQueues(void) const
Get the number of internal queues.
Definition: queue-disc.cc:499
void AddInternalQueue(Ptr< InternalQueue > queue)
Add an internal queue to the tail of the list of queues.
Definition: queue-disc.cc:472
Hold variables of type enum.
Definition: enum.h:54
uint32_t m_states
Total number of times we are in state 1, state 2, or state 3.
uint32_t m_firstAboveTime
Time to declare sojourn time above target.
uint32_t m_state2
Number of times we perform next drop while in dropping state.
bool CoDelTimeBefore(uint32_t a, uint32_t b)
Check if CoDel time a is preceding b.
Hold an unsigned integer type.
Definition: uinteger.h:44
double ToDouble(enum Unit unit) const
Get the Time value expressed in a particular unit.
Definition: nstime.h:491
QueueDiscMode GetMode(void)
Get the operating mode of this queue disc.
Time m_target
5 ms target queue delay
CoDelQueueDisc()
CoDelQueueDisc Constructor.
uint32_t GetQueueSize(void)
Get the current value of the queue in bytes or packets.
uint32_t GetNPacketFilters(void) const
Get the number of packet filters.
Definition: queue-disc.cc:519
TracedValue< uint32_t > m_lastCount
Last number of packets dropped since entering drop state.
Time m_interval
100 ms sliding minimum time window width
virtual Ptr< QueueDiscItem > DoDequeue(void)
Remove a packet from queue based on the current state If we are in dropping state, check if we could leave the dropping state or if we should perform next drop If we are not currently in dropping state, check if we need to enter the state and drop the first packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t m_recInvSqrt
Reciprocal inverse square root.
#define REC_INV_SQRT_SHIFT
Time GetTarget(void)
Get the target queue delay.
#define DEFAULT_CODEL_LIMIT
void NewtonStep(void)
Calculate the reciprocal square root of m_count by using Newton's method http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Iterative_methods_for_reciprocal_square_roots m_recInvSqrt (new) = (m_recInvSqrt (old) / 2) * (3 - m_count * m_recInvSqrt^2)
A CoDel packet queue disc.
Use number of bytes for maximum queue size.
Definition: queue.h:167
static const int CODEL_SHIFT
Number of bits discarded from the time representation.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: nstime.h:1056
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint32_t m_state3
Number of times we enter drop state and drop the fist packet.
uint32_t Time2CoDel(Time t)
Return the unsigned 32-bit integer representation of the input Time object.
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:353
static TypeId GetTypeId(void)
Get the type ID.
bool CoDelTimeBeforeEq(uint32_t a, uint32_t b)
Check if CoDel time a is preceding or equal to b.
void SetMode(QueueDiscMode mode)
Set the operating mode of this queue disc.
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name.
Definition: enum.cc:184
uint32_t m_minBytes
Minimum bytes in queue to allow a packet drop.
static uint32_t ReciprocalDivide(uint32_t A, uint32_t R)
Performs a reciprocal divide, similar to the Linux kernel reciprocal_divide function.
Use number of bytes for maximum queue disc size.
static uint32_t CoDelGetTime(void)
Returns the current time translated in CoDel time representation.
QueueDiscMode
Enumeration of the modes supported in the class.
void DropAfterDequeue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped after dequeue...
Definition: queue-disc.cc:648
Use number of packets for maximum queue disc size.
uint32_t m_state1
Number of times packet sojourn goes above target for interval.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:253
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: uinteger.h:45
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:914
TracedValue< uint32_t > m_dropNext
Time to drop next packet.
uint32_t GetNPackets(void) const
Get the number of packets stored by the queue disc.
Definition: queue-disc.cc:430