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
28namespace ns3 {
29
50public:
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
68private:
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 */
Linux pfifo_fast is the default priority queue enabled on Linux systems.
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
static TypeId GetTypeId(void)
Get the type ID.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
virtual void InitializeParams(void)
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:74
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:181
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.