A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
aodv-dpd.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
*
7
* Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
8
* Pavel Boyko <boyko@iitp.ru>
9
*/
10
11
#include "
aodv-dpd.h
"
12
13
namespace
ns3
14
{
15
namespace
aodv
16
{
17
18
bool
19
DuplicatePacketDetection::IsDuplicate
(
Ptr<const Packet>
p,
const
Ipv4Header
& header)
20
{
21
return
m_idCache
.
IsDuplicate
(header.
GetSource
(), p->GetUid());
22
}
23
24
void
25
DuplicatePacketDetection::SetLifetime
(
Time
lifetime)
26
{
27
m_idCache
.
SetLifetime
(lifetime);
28
}
29
30
Time
31
DuplicatePacketDetection::GetLifetime
()
const
32
{
33
return
m_idCache
.
GetLifeTime
();
34
}
35
36
}
// namespace aodv
37
}
// namespace ns3
aodv-dpd.h
ns3::Ipv4Header
Packet header for IPv4.
Definition
ipv4-header.h:23
ns3::Ipv4Header::GetSource
Ipv4Address GetSource() const
Definition
ipv4-header.cc:291
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::aodv::DuplicatePacketDetection::m_idCache
IdCache m_idCache
Impl.
Definition
aodv-dpd.h:65
ns3::aodv::DuplicatePacketDetection::GetLifetime
Time GetLifetime() const
Get duplicate record lifetime.
Definition
aodv-dpd.cc:31
ns3::aodv::DuplicatePacketDetection::IsDuplicate
bool IsDuplicate(Ptr< const Packet > p, const Ipv4Header &header)
Check if the packet is a duplicate.
Definition
aodv-dpd.cc:19
ns3::aodv::DuplicatePacketDetection::SetLifetime
void SetLifetime(Time lifetime)
Set duplicate record lifetime.
Definition
aodv-dpd.cc:25
ns3::aodv::IdCache::SetLifetime
void SetLifetime(Time lifetime)
Set lifetime for future added entries.
Definition
aodv-id-cache.h:64
ns3::aodv::IdCache::GetLifeTime
Time GetLifeTime() const
Return lifetime for existing entries in cache.
Definition
aodv-id-cache.h:73
ns3::aodv::IdCache::IsDuplicate
bool IsDuplicate(Ipv4Address addr, uint32_t id)
Check that entry (addr, id) exists in cache.
Definition
aodv-id-cache.cc:25
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
aodv
model
aodv-dpd.cc
Generated on Fri Nov 8 2024 13:58:58 for ns-3 by
1.11.0