Helper class used to remember already seen packets and detect duplicates. More...
#include "aodv-dpd.h"
 Collaboration diagram for ns3::aodv::DuplicatePacketDetection:
 Collaboration diagram for ns3::aodv::DuplicatePacketDetection:| Public Member Functions | |
| DuplicatePacketDetection (Time lifetime) | |
| Constructor. | |
| Time | GetLifetime () const | 
| Get duplicate record lifetime. | |
| bool | IsDuplicate (Ptr< const Packet > p, const Ipv4Header &header) | 
| Check if the packet is a duplicate. | |
| void | SetLifetime (Time lifetime) | 
| Set duplicate record lifetime. | |
| Private Attributes | |
| IdCache | m_idCache | 
| Impl. | |
Helper class used to remember already seen packets and detect duplicates.
Currently duplicate detection is based on unique packet ID given by Packet::GetUid () This approach is known to be weak (ns3::Packet UID is an internal identifier and not intended for logical uniqueness in models) and should be changed.
Definition at line 33 of file aodv-dpd.h.
| 
 | inline | 
Constructor.
| lifetime | the lifetime for added entries | 
Definition at line 40 of file aodv-dpd.h.
| Time ns3::aodv::DuplicatePacketDetection::GetLifetime | ( | ) | const | 
Get duplicate record lifetime.
Definition at line 31 of file aodv-dpd.cc.
References ns3::aodv::IdCache::GetLifeTime(), and m_idCache.
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::aodv::DuplicatePacketDetection::IsDuplicate | ( | Ptr< const Packet > | p, | 
| const Ipv4Header & | header ) | 
Check if the packet is a duplicate.
If not, save information about this packet.
| p | the packet to check | 
| header | the IP header to check | 
Definition at line 19 of file aodv-dpd.cc.
References ns3::Ipv4Header::GetSource(), ns3::aodv::IdCache::IsDuplicate(), and m_idCache.
Referenced by ns3::aodv::RoutingProtocol::RouteInput().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::aodv::DuplicatePacketDetection::SetLifetime | ( | Time | lifetime | ) | 
Set duplicate record lifetime.
| lifetime | the lifetime for duplicate records | 
Definition at line 25 of file aodv-dpd.cc.
References m_idCache, and ns3::aodv::IdCache::SetLifetime().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Impl.
Definition at line 65 of file aodv-dpd.h.
Referenced by GetLifetime(), IsDuplicate(), and SetLifetime().