A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2016 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
19
#ifndef IPV6_QUEUE_DISC_ITEM_H
20
#define IPV6_QUEUE_DISC_ITEM_H
21
22
#include "ns3/packet.h"
23
#include "ns3/queue-item.h"
24
#include "
ipv6-header.h
"
25
26
namespace
ns3
{
27
36
class
Ipv6QueueDiscItem
:
public
QueueDiscItem
{
37
public
:
45
Ipv6QueueDiscItem
(
Ptr<Packet>
p,
const
Address
& addr, uint16_t protocol,
const
Ipv6Header
& header);
46
47
virtual
~Ipv6QueueDiscItem
();
48
49
// Delete default constructor, copy constructor and assignment operator to avoid misuse
50
Ipv6QueueDiscItem
() =
delete
;
51
Ipv6QueueDiscItem
(
const
Ipv6QueueDiscItem
&) =
delete
;
52
Ipv6QueueDiscItem
&
operator =
(
const
Ipv6QueueDiscItem
&) =
delete
;
53
57
virtual
uint32_t
GetSize
(
void
)
const
;
58
62
const
Ipv6Header
&
GetHeader
(
void
)
const
;
63
67
virtual
void
AddHeader
(
void
);
68
73
virtual
void
Print
(std::ostream &os)
const
;
74
75
/*
76
* The values for the fields of the Ipv6 header are taken from m_header and
77
* thus might differ from those present in the packet in case the header is
78
* modified after being added to the packet. However, this function is likely
79
* to be called before the header is added to the packet (i.e., before the
80
* packet is dequeued from the queue disc)
81
*/
82
virtual
bool
GetUint8Value
(
Uint8Values
field, uint8_t &value)
const
;
83
89
virtual
bool
Mark
(
void
);
90
101
virtual
uint32_t
Hash
(uint32_t perturbation)
const
;
102
103
private
:
104
Ipv6Header
m_header
;
105
bool
m_headerAdded
;
106
};
107
108
}
// namespace ns3
109
110
#endif
/* IPV6_QUEUE_DISC_ITEM_H */
ns3::Address
a polymophic address class
Definition:
address.h:91
ns3::Ipv6Header
Packet header for IPv6.
Definition:
ipv6-header.h:36
ns3::Ipv6QueueDiscItem
Ipv6QueueDiscItem is a subclass of QueueDiscItem which stores IPv6 packets.
Definition:
ipv6-queue-disc-item.h:36
ns3::Ipv6QueueDiscItem::Ipv6QueueDiscItem
Ipv6QueueDiscItem()=delete
ns3::Ipv6QueueDiscItem::AddHeader
virtual void AddHeader(void)
Add the header to the packet.
Definition:
ipv6-queue-disc-item.cc:60
ns3::Ipv6QueueDiscItem::Ipv6QueueDiscItem
Ipv6QueueDiscItem(const Ipv6QueueDiscItem &)=delete
ns3::Ipv6QueueDiscItem::m_header
Ipv6Header m_header
The IPv6 header.
Definition:
ipv6-queue-disc-item.h:104
ns3::Ipv6QueueDiscItem::Hash
virtual uint32_t Hash(uint32_t perturbation) const
Computes the hash of the packet's 5-tuple.
Definition:
ipv6-queue-disc-item.cc:114
ns3::Ipv6QueueDiscItem::GetHeader
const Ipv6Header & GetHeader(void) const
Definition:
ipv6-queue-disc-item.cc:55
ns3::Ipv6QueueDiscItem::GetUint8Value
virtual bool GetUint8Value(Uint8Values field, uint8_t &value) const
Retrieve the value of a given field from the packet, if present.
Definition:
ipv6-queue-disc-item.cc:98
ns3::Ipv6QueueDiscItem::Mark
virtual bool Mark(void)
Marks the packet by setting ECN_CE bits if the packet has ECN_ECT0 or ECN_ECT1 set.
Definition:
ipv6-queue-disc-item.cc:86
ns3::Ipv6QueueDiscItem::~Ipv6QueueDiscItem
virtual ~Ipv6QueueDiscItem()
Definition:
ipv6-queue-disc-item.cc:36
ns3::Ipv6QueueDiscItem::Print
virtual void Print(std::ostream &os) const
Print the item contents.
Definition:
ipv6-queue-disc-item.cc:72
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:105
ns3::Ipv6QueueDiscItem::GetSize
virtual uint32_t GetSize(void) const
Definition:
ipv6-queue-disc-item.cc:41
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 Tue Feb 6 2024 19:21:19 for ns-3 by
1.9.1