A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
57 class PfifoFastQueueDisc : public QueueDisc {
58 public:
63  static TypeId GetTypeId (void);
70 
71  virtual ~PfifoFastQueueDisc();
72 
73 private:
74  virtual bool DoEnqueue (Ptr<QueueDiscItem> item);
75  virtual Ptr<QueueDiscItem> DoDequeue (void);
76  virtual Ptr<const QueueDiscItem> DoPeek (void) const;
77  virtual bool CheckConfig (void);
78  virtual void InitializeParams (void);
79 
80  uint32_t m_limit;
81 };
82 
83 } // namespace ns3
84 
85 #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:205
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
uint32_t m_limit
Maximum number of packets that can be stored.
virtual Ptr< const QueueDiscItem > DoPeek(void) const
This function returns a copy of the next packet the queue disc will extract.
static TypeId GetTypeId(void)
Get the type ID.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
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.