A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
aodv-dpd.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
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
* Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
19
* Pavel Boyko <boyko@iitp.ru>
20
*/
21
22
#ifndef AODV_DPD_H
23
#define AODV_DPD_H
24
25
#include "
aodv-id-cache.h
"
26
27
#include "ns3/ipv4-header.h"
28
#include "ns3/nstime.h"
29
#include "ns3/packet.h"
30
31
namespace
ns3
32
{
33
namespace
aodv
34
{
44
class
DuplicatePacketDetection
45
{
46
public
:
51
DuplicatePacketDetection
(
Time
lifetime)
52
:
m_idCache
(lifetime)
53
{
54
}
55
62
bool
IsDuplicate
(
Ptr<const Packet>
p,
const
Ipv4Header
& header);
67
void
SetLifetime
(
Time
lifetime);
72
Time
GetLifetime
()
const
;
73
74
private
:
76
IdCache
m_idCache
;
77
};
78
79
}
// namespace aodv
80
}
// namespace ns3
81
82
#endif
/* AODV_DPD_H */
aodv-id-cache.h
ns3::Ipv4Header
Packet header for IPv4.
Definition:
ipv4-header.h:34
ns3::Ptr< const Packet >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::aodv::DuplicatePacketDetection
Helper class used to remember already seen packets and detect duplicates.
Definition:
aodv-dpd.h:45
ns3::aodv::DuplicatePacketDetection::m_idCache
IdCache m_idCache
Impl.
Definition:
aodv-dpd.h:76
ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection
DuplicatePacketDetection(Time lifetime)
Constructor.
Definition:
aodv-dpd.h:51
ns3::aodv::DuplicatePacketDetection::GetLifetime
Time GetLifetime() const
Get duplicate record lifetime.
Definition:
aodv-dpd.cc:42
ns3::aodv::DuplicatePacketDetection::IsDuplicate
bool IsDuplicate(Ptr< const Packet > p, const Ipv4Header &header)
Check if the packet is a duplicate.
Definition:
aodv-dpd.cc:30
ns3::aodv::DuplicatePacketDetection::SetLifetime
void SetLifetime(Time lifetime)
Set duplicate record lifetime.
Definition:
aodv-dpd.cc:36
ns3::aodv::IdCache
Unique packets identification cache used for simple duplicate detection.
Definition:
aodv-id-cache.h:46
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
aodv
model
aodv-dpd.h
Generated on Sun Mar 3 2024 17:10:52 for ns-3 by
1.9.1