A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
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
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2018 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 ARP_QUEUE_DISC_ITEM_H
20
#define ARP_QUEUE_DISC_ITEM_H
21
22
#include "ns3/packet.h"
23
#include "ns3/queue-item.h"
24
#include "
arp-header.h
"
25
26
namespace
ns3
{
27
36
class
ArpQueueDiscItem
:
public
QueueDiscItem
{
37
public
:
45
ArpQueueDiscItem
(
Ptr<Packet>
p,
const
Address
& addr, uint16_t protocol,
const
ArpHeader
& header);
46
48
virtual
~ArpQueueDiscItem
();
49
50
// Delete default constructor, copy constructor and assignment operator to avoid misuse
51
ArpQueueDiscItem
() =
delete
;
52
ArpQueueDiscItem
(
const
ArpQueueDiscItem
&) =
delete
;
53
ArpQueueDiscItem
&
operator =
(
const
ArpQueueDiscItem
&) =
delete
;
54
58
virtual
uint32_t
GetSize
(
void
)
const
;
59
63
const
ArpHeader
&
GetHeader
(
void
)
const
;
64
68
virtual
void
AddHeader
(
void
);
69
74
virtual
void
Print
(std::ostream &os)
const
;
75
80
virtual
bool
Mark
(
void
);
81
88
virtual
uint32_t
Hash
(uint32_t perturbation)
const
;
89
90
private
:
91
ArpHeader
m_header
;
92
bool
m_headerAdded
;
93
};
94
95
}
// namespace ns3
96
97
#endif
/* ARP_QUEUE_DISC_ITEM_H */
arp-header.h
ns3::Address
a polymophic address class
Definition:
address.h:91
ns3::ArpHeader
The packet header for an ARP packet.
Definition:
arp-header.h:35
ns3::ArpQueueDiscItem
ArpQueueDiscItem is a subclass of QueueDiscItem which stores ARP packets.
Definition:
arp-queue-disc-item.h:36
ns3::ArpQueueDiscItem::Hash
virtual uint32_t Hash(uint32_t perturbation) const
Computes the hash of the packet's 5-tuple.
Definition:
arp-queue-disc-item.cc:91
ns3::ArpQueueDiscItem::m_header
ArpHeader m_header
The ARP header.
Definition:
arp-queue-disc-item.h:91
ns3::ArpQueueDiscItem::ArpQueueDiscItem
ArpQueueDiscItem()=delete
ns3::ArpQueueDiscItem::m_headerAdded
bool m_headerAdded
True if the header has already been added to the packet.
Definition:
arp-queue-disc-item.h:92
ns3::ArpQueueDiscItem::Mark
virtual bool Mark(void)
Inherited from the base class, but we cannot mark ARP packets.
Definition:
arp-queue-disc-item.cc:84
ns3::ArpQueueDiscItem::~ArpQueueDiscItem
virtual ~ArpQueueDiscItem()
Destructor.
Definition:
arp-queue-disc-item.cc:34
ns3::ArpQueueDiscItem::AddHeader
virtual void AddHeader(void)
Add the header to the packet.
Definition:
arp-queue-disc-item.cc:58
ns3::ArpQueueDiscItem::ArpQueueDiscItem
ArpQueueDiscItem(const ArpQueueDiscItem &)=delete
ns3::ArpQueueDiscItem::GetHeader
const ArpHeader & GetHeader(void) const
Definition:
arp-queue-disc-item.cc:53
ns3::ArpQueueDiscItem::Print
virtual void Print(std::ostream &os) const
Print the item contents.
Definition:
arp-queue-disc-item.cc:70
ns3::ArpQueueDiscItem::GetSize
virtual uint32_t GetSize(void) const
Definition:
arp-queue-disc-item.cc:39
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 Tue Feb 6 2024 19:21:18 for ns-3 by
1.9.1