A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
arp-queue-disc-item.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 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 ARP_QUEUE_DISC_ITEM_H
19
#define ARP_QUEUE_DISC_ITEM_H
20
21
#include "
arp-header.h
"
22
23
#include "ns3/packet.h"
24
#include "ns3/queue-item.h"
25
26
namespace
ns3
27
{
28
37
class
ArpQueueDiscItem
:
public
QueueDiscItem
38
{
39
public
:
47
ArpQueueDiscItem
(
Ptr<Packet>
p,
48
const
Address
& addr,
49
uint16_t protocol,
50
const
ArpHeader
& header);
51
53
~ArpQueueDiscItem
()
override
;
54
55
// Delete default constructor, copy constructor and assignment operator to avoid misuse
56
ArpQueueDiscItem
() =
delete
;
57
ArpQueueDiscItem
(
const
ArpQueueDiscItem
&) =
delete
;
58
ArpQueueDiscItem
&
operator=
(
const
ArpQueueDiscItem
&) =
delete
;
59
63
uint32_t
GetSize
()
const override
;
64
68
const
ArpHeader
&
GetHeader
()
const
;
69
73
void
AddHeader
()
override
;
74
79
void
Print
(std::ostream& os)
const override
;
80
85
bool
Mark
()
override
;
86
93
uint32_t
Hash
(uint32_t perturbation)
const override
;
94
95
private
:
96
ArpHeader
m_header
;
97
bool
m_headerAdded
;
98
};
99
100
}
// namespace ns3
101
102
#endif
/* ARP_QUEUE_DISC_ITEM_H */
arp-header.h
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::ArpHeader
The packet header for an ARP packet.
Definition:
arp-header.h:36
ns3::ArpQueueDiscItem
ArpQueueDiscItem is a subclass of QueueDiscItem which stores ARP packets.
Definition:
arp-queue-disc-item.h:38
ns3::ArpQueueDiscItem::AddHeader
void AddHeader() override
Add the header to the packet.
Definition:
arp-queue-disc-item.cc:63
ns3::ArpQueueDiscItem::m_header
ArpHeader m_header
The ARP header.
Definition:
arp-queue-disc-item.h:96
ns3::ArpQueueDiscItem::ArpQueueDiscItem
ArpQueueDiscItem()=delete
ns3::ArpQueueDiscItem::GetHeader
const ArpHeader & GetHeader() const
Definition:
arp-queue-disc-item.cc:57
ns3::ArpQueueDiscItem::m_headerAdded
bool m_headerAdded
True if the header has already been added to the packet.
Definition:
arp-queue-disc-item.h:97
ns3::ArpQueueDiscItem::Hash
uint32_t Hash(uint32_t perturbation) const override
Computes the hash of the packet's 5-tuple.
Definition:
arp-queue-disc-item.cc:95
ns3::ArpQueueDiscItem::Print
void Print(std::ostream &os) const override
Print the item contents.
Definition:
arp-queue-disc-item.cc:75
ns3::ArpQueueDiscItem::ArpQueueDiscItem
ArpQueueDiscItem(const ArpQueueDiscItem &)=delete
ns3::ArpQueueDiscItem::Mark
bool Mark() override
Inherited from the base class, but we cannot mark ARP packets.
Definition:
arp-queue-disc-item.cc:88
ns3::ArpQueueDiscItem::GetSize
uint32_t GetSize() const override
Definition:
arp-queue-disc-item.cc:43
ns3::ArpQueueDiscItem::~ArpQueueDiscItem
~ArpQueueDiscItem() override
Destructor.
Definition:
arp-queue-disc-item.cc:37
ns3::ArpQueueDiscItem::operator=
ArpQueueDiscItem & operator=(const ArpQueueDiscItem &)=delete
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
arp-queue-disc-item.h
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1