A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
26namespace ns3
27{
28
38{
39 public:
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;
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:
98};
99
100} // namespace ns3
101
102#endif /* ARP_QUEUE_DISC_ITEM_H */
a polymophic address class
Definition: address.h:100
The packet header for an ARP packet.
Definition: arp-header.h:36
ArpQueueDiscItem is a subclass of QueueDiscItem which stores ARP packets.
void AddHeader() override
Add the header to the packet.
ArpHeader m_header
The ARP header.
const ArpHeader & GetHeader() const
bool m_headerAdded
True if the header has already been added to the packet.
uint32_t Hash(uint32_t perturbation) const override
Computes the hash of the packet's 5-tuple.
ArpQueueDiscItem & operator=(const ArpQueueDiscItem &)=delete
void Print(std::ostream &os) const override
Print the item contents.
ArpQueueDiscItem(const ArpQueueDiscItem &)=delete
bool Mark() override
Inherited from the base class, but we cannot mark ARP packets.
uint32_t GetSize() const override
~ArpQueueDiscItem() override
Destructor.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
QueueDiscItem is the abstract base class for items that are stored in a queue disc.
Definition: queue-item.h:133
Every class exported by the ns3 library is enclosed in the ns3 namespace.