A Discrete-Event Network Simulator
API
pfifo-fast-queue-disc.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007, 2014 University of Washington
4  * 2015 Universita' degli Studi di Napoli Federico II
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Stefano Avallone <stavallo@unina.it>
20  * Tom Henderson <tomhend@u.washington.edu>
21  */
22 
23 #ifndef PFIFO_FAST_H
24 #define PFIFO_FAST_H
25 
26 #include "ns3/queue-disc.h"
27 
28 namespace ns3 {
29 
49 class PfifoFastQueueDisc : public QueueDisc {
50 public:
55  static TypeId GetTypeId (void);
62 
63  virtual ~PfifoFastQueueDisc();
64 
65  // Reasons for dropping packets
66  static constexpr const char* LIMIT_EXCEEDED_DROP = "Queue disc limit exceeded";
67 
68 private:
73  static const uint32_t prio2band[16];
74 
75  virtual bool DoEnqueue (Ptr<QueueDiscItem> item);
76  virtual Ptr<QueueDiscItem> DoDequeue (void);
77  virtual Ptr<const QueueDiscItem> DoPeek (void);
78  virtual bool CheckConfig (void);
79  virtual void InitializeParams (void);
80 };
81 
82 } // namespace ns3
83 
84 #endif /* PFIFO_FAST_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:182
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
static const uint32_t prio2band[16]
Priority to band map.
Linux pfifo_fast is the default priority queue enabled on Linux systems.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
a unique identifier for an interface.
Definition: type-id.h:58
PfifoFastQueueDisc()
PfifoFastQueueDisc constructor.