A Discrete-Event Network Simulator
API
pfifo-fast-queue-disc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007, 2014 University of Washington
3  * 2015 Universita' degli Studi di Napoli Federico II
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  * Authors: Stefano Avallone <stavallo@unina.it>
19  * Tom Henderson <tomhend@u.washington.edu>
20  */
21 
22 #ifndef PFIFO_FAST_H
23 #define PFIFO_FAST_H
24 
25 #include "queue-disc.h"
26 
27 namespace ns3
28 {
29 
50 {
51  public:
56  static TypeId GetTypeId();
63 
64  ~PfifoFastQueueDisc() override;
65 
66  // Reasons for dropping packets
67  static constexpr const char* LIMIT_EXCEEDED_DROP =
68  "Queue disc limit exceeded";
69 
70  private:
75  static const uint32_t prio2band[16];
76 
77  bool DoEnqueue(Ptr<QueueDiscItem> item) override;
78  Ptr<QueueDiscItem> DoDequeue() override;
80  bool CheckConfig() override;
81  void InitializeParams() override;
82 };
83 
84 } // namespace ns3
85 
86 #endif /* PFIFO_FAST_H */
Linux pfifo_fast is the default priority queue enabled on Linux systems.
bool DoEnqueue(Ptr< QueueDiscItem > item) override
This function actually enqueues a packet into the queue disc.
Ptr< const QueueDiscItem > DoPeek() override
Return a copy of the next packet the queue disc will extract.
static TypeId GetTypeId()
Get the type ID.
bool CheckConfig() override
Check whether the current configuration is correct.
Ptr< QueueDiscItem > DoDequeue() override
This function actually extracts a packet from the queue disc.
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
void InitializeParams() override
Initialize parameters (if any) before the first packet is enqueued.
static const uint32_t prio2band[16]
Priority to band map.
PfifoFastQueueDisc()
PfifoFastQueueDisc constructor.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:184
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.