A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::aodv::DuplicatePacketDetection Class Reference

Helper class used to remember already seen packets and detect duplicates. More...

#include <aodv-dpd.h>

+ Collaboration diagram for ns3::aodv::DuplicatePacketDetection:

Public Member Functions

 DuplicatePacketDetection (Time lifetime)
 C-tor. More...
 
Time GetLifetime () const
 Get duplicate records lifetimes. More...
 
bool IsDuplicate (Ptr< const Packet > p, const Ipv4Header &header)
 Check that the packet is duplicated. If not, save information about this packet. More...
 
void SetLifetime (Time lifetime)
 Set duplicate records lifetimes. More...
 

Private Attributes

IdCache m_idCache
 Impl. More...
 

Detailed Description

Helper class used to remember already seen packets and detect duplicates.

Currently duplicate detection is based on uinique packet ID given by Packet::GetUid () This approach is known to be weak and should be changed.

Definition at line 43 of file aodv-dpd.h.

Constructor & Destructor Documentation

ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection ( Time  lifetime)
inline

C-tor.

Definition at line 47 of file aodv-dpd.h.

Member Function Documentation

Time ns3::aodv::DuplicatePacketDetection::GetLifetime ( ) const

Get duplicate records lifetimes.

Definition at line 42 of file aodv-dpd.cc.

References ns3::aodv::IdCache::GetLifeTime(), and m_idCache.

+ Here is the call graph for this function:

bool ns3::aodv::DuplicatePacketDetection::IsDuplicate ( Ptr< const Packet p,
const Ipv4Header header 
)

Check that the packet is duplicated. If not, save information about this packet.

Definition at line 31 of file aodv-dpd.cc.

References ns3::Ipv4Header::GetSource(), ns3::Packet::GetUid(), ns3::aodv::IdCache::IsDuplicate(), and m_idCache.

Referenced by ns3::aodv::RoutingProtocol::RouteInput().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::DuplicatePacketDetection::SetLifetime ( Time  lifetime)

Set duplicate records lifetimes.

Definition at line 36 of file aodv-dpd.cc.

References m_idCache, and ns3::aodv::IdCache::SetLifetime().

+ Here is the call graph for this function:

Member Data Documentation

IdCache ns3::aodv::DuplicatePacketDetection::m_idCache
private

Impl.

Definition at line 56 of file aodv-dpd.h.

Referenced by GetLifetime(), IsDuplicate(), and SetLifetime().


The documentation for this class was generated from the following files: