A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ofswitch13-queue.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 University of Campinas (Unicamp)
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Luciano Jerez Chaves <ljerezchaves@gmail.com>
18
*/
19
#ifndef OFSWITCH13_QUEUE_H
20
#define OFSWITCH13_QUEUE_H
21
22
#include "
ofswitch13-interface.h
"
23
24
#include <ns3/packet.h>
25
#include <ns3/queue.h>
26
27
namespace
ns3
28
{
29
30
// The following explicit template instantiation declaration prevents modules
31
// including this header file from implicitly instantiating Queue<Packet>.
32
extern
template
class
Queue<Packet>
;
33
54
class
OFSwitch13Queue
:
public
Queue<Packet>
55
{
56
public
:
61
static
TypeId
GetTypeId();
62
63
OFSwitch13Queue
();
64
~
OFSwitch13Queue
()
override
;
65
66
// Inherited from Queue.
67
bool
Enqueue(
Ptr<Packet>
packet)
override
;
68
73
int
GetNQueues()
const
;
74
82
Ptr<Queue<Packet>
> GetQueue(
int
queueId)
const
;
83
88
void
SetPortStruct(
struct
sw_port*
port
);
89
90
protected
:
92
void
DoDispose()
override
;
93
94
// Inherited from Object.
95
void
DoInitialize()
override
;
96
102
uint32_t AddQueue(
Ptr
<
Queue<Packet>
> queue);
103
108
void
NotifyDequeue(
Ptr<Packet>
packet);
109
114
void
NotifyRemove(
Ptr<Packet>
packet);
115
116
// Values used for logging context.
117
uint64_t
m_dpId
;
118
uint32_t
m_portNo
;
119
120
private
:
123
typedef
std::vector<Ptr<Queue>>
QueueList_t
;
124
125
struct
sw_port*
m_swPort
;
126
QueueList_t
m_queues
;
127
128
NS_LOG_TEMPLATE_DECLARE
;
129
};
130
131
}
// namespace ns3
132
#endif
/* OFSWITCH13_QUEUE_H */
ns3::OFSwitch13Queue
The OpenFlow 1.3 queue interface.
Definition:
ofswitch13-queue.h:55
ns3::OFSwitch13Queue::NS_LOG_TEMPLATE_DECLARE
NS_LOG_TEMPLATE_DECLARE
Redefinition of the log component.
Definition:
ofswitch13-queue.h:128
ns3::OFSwitch13Queue::m_queues
QueueList_t m_queues
List of internal queues.
Definition:
ofswitch13-queue.h:126
ns3::OFSwitch13Queue::QueueList_t
std::vector< Ptr< Queue > > QueueList_t
Structure to save the list of internal queues in this queue interface.
Definition:
ofswitch13-queue.h:123
ns3::OFSwitch13Queue::m_swPort
struct sw_port * m_swPort
BOFUSS port structure.
Definition:
ofswitch13-queue.h:125
ns3::OFSwitch13Queue::m_dpId
uint64_t m_dpId
OpenFlow datapath ID.
Definition:
ofswitch13-queue.h:117
ns3::OFSwitch13Queue::m_portNo
uint32_t m_portNo
OpenFlow port number.
Definition:
ofswitch13-queue.h:118
ns3::Ptr< Packet >
Queue< Packet >
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
port
uint16_t port
Definition:
dsdv-manet.cc:45
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ofswitch13-interface.h
contrib
ofswitch13
model
ofswitch13-queue.h
Generated on Fri Mar 31 2023 13:30:37 for ns-3 by
1.9.1