A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6-queue-disc-item.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Universita' degli Studi di Napoli Federico II
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
18
#ifndef IPV6_QUEUE_DISC_ITEM_H
19
#define IPV6_QUEUE_DISC_ITEM_H
20
21
#include "
ipv6-header.h
"
22
23
#include "ns3/packet.h"
24
#include "ns3/queue-item.h"
25
26
namespace
ns3
27
{
28
37
class
Ipv6QueueDiscItem
:
public
QueueDiscItem
38
{
39
public
:
47
Ipv6QueueDiscItem
(
Ptr<Packet>
p,
48
const
Address
& addr,
49
uint16_t protocol,
50
const
Ipv6Header
& header);
51
52
~Ipv6QueueDiscItem
()
override
;
53
54
// Delete default constructor, copy constructor and assignment operator to avoid misuse
55
Ipv6QueueDiscItem
() =
delete
;
56
Ipv6QueueDiscItem
(
const
Ipv6QueueDiscItem
&) =
delete
;
57
Ipv6QueueDiscItem
&
operator=
(
const
Ipv6QueueDiscItem
&) =
delete
;
58
62
uint32_t
GetSize
()
const override
;
63
67
const
Ipv6Header
&
GetHeader
()
const
;
68
72
void
AddHeader
()
override
;
73
78
void
Print
(std::ostream& os)
const override
;
79
80
/*
81
* The values for the fields of the Ipv6 header are taken from m_header and
82
* thus might differ from those present in the packet in case the header is
83
* modified after being added to the packet. However, this function is likely
84
* to be called before the header is added to the packet (i.e., before the
85
* packet is dequeued from the queue disc)
86
*/
87
bool
GetUint8Value
(
Uint8Values
field, uint8_t& value)
const override
;
88
94
bool
Mark
()
override
;
95
106
uint32_t
Hash
(uint32_t perturbation)
const override
;
107
108
private
:
109
Ipv6Header
m_header
;
110
bool
m_headerAdded
;
111
};
112
113
}
// namespace ns3
114
115
#endif
/* IPV6_QUEUE_DISC_ITEM_H */
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::Ipv6Header
Packet header for IPv6.
Definition:
ipv6-header.h:35
ns3::Ipv6QueueDiscItem
Ipv6QueueDiscItem is a subclass of QueueDiscItem which stores IPv6 packets.
Definition:
ipv6-queue-disc-item.h:38
ns3::Ipv6QueueDiscItem::GetHeader
const Ipv6Header & GetHeader() const
Definition:
ipv6-queue-disc-item.cc:60
ns3::Ipv6QueueDiscItem::Ipv6QueueDiscItem
Ipv6QueueDiscItem()=delete
ns3::Ipv6QueueDiscItem::AddHeader
void AddHeader() override
Add the header to the packet.
Definition:
ipv6-queue-disc-item.cc:66
ns3::Ipv6QueueDiscItem::Mark
bool Mark() override
Marks the packet by setting ECN_CE bits if the packet has ECN_ECT0 or ECN_ECT1 set.
Definition:
ipv6-queue-disc-item.cc:91
ns3::Ipv6QueueDiscItem::GetUint8Value
bool GetUint8Value(Uint8Values field, uint8_t &value) const override
Retrieve the value of a given field from the packet, if present.
Definition:
ipv6-queue-disc-item.cc:103
ns3::Ipv6QueueDiscItem::GetSize
uint32_t GetSize() const override
Definition:
ipv6-queue-disc-item.cc:46
ns3::Ipv6QueueDiscItem::Ipv6QueueDiscItem
Ipv6QueueDiscItem(const Ipv6QueueDiscItem &)=delete
ns3::Ipv6QueueDiscItem::m_header
Ipv6Header m_header
The IPv6 header.
Definition:
ipv6-queue-disc-item.h:109
ns3::Ipv6QueueDiscItem::Print
void Print(std::ostream &os) const override
Print the item contents.
Definition:
ipv6-queue-disc-item.cc:78
ns3::Ipv6QueueDiscItem::~Ipv6QueueDiscItem
~Ipv6QueueDiscItem() override
Definition:
ipv6-queue-disc-item.cc:40
ns3::Ipv6QueueDiscItem::Hash
uint32_t Hash(uint32_t perturbation) const override
Computes the hash of the packet's 5-tuple.
Definition:
ipv6-queue-disc-item.cc:119
ns3::Ipv6QueueDiscItem::operator=
Ipv6QueueDiscItem & operator=(const Ipv6QueueDiscItem &)=delete
ns3::Ipv6QueueDiscItem::m_headerAdded
bool m_headerAdded
True if the header has already been added to the packet.
Definition:
ipv6-queue-disc-item.h:110
ns3::Ptr< Packet >
ns3::QueueDiscItem
QueueDiscItem is the abstract base class for items that are stored in a queue disc.
Definition:
queue-item.h:133
ns3::QueueItem::Uint8Values
Uint8Values
1-byte fields of the packet whose value can be retrieved, if present
Definition:
queue-item.h:82
ipv6-header.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
ipv6-queue-disc-item.h
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1