Unique packets identification cache used for simple duplicate detection. More...
#include "aodv-id-cache.h"
 Collaboration diagram for ns3::aodv::IdCache:
 Collaboration diagram for ns3::aodv::IdCache:| Classes | |
| struct | IsExpired | 
| IsExpired structure.  More... | |
| struct | UniqueId | 
| Unique packet ID.  More... | |
| Public Member Functions | |
| IdCache (Time lifetime) | |
| constructor  More... | |
| Time | GetLifeTime () const | 
| Return lifetime for existing entries in cache.  More... | |
| uint32_t | GetSize () | 
| bool | IsDuplicate (Ipv4Address addr, uint32_t id) | 
| Check that entry (addr, id) exists in cache.  More... | |
| void | Purge () | 
| Remove all expired entries.  More... | |
| void | SetLifetime (Time lifetime) | 
| Set lifetime for future added entries.  More... | |
| Private Attributes | |
| std::vector< UniqueId > | m_idCache | 
| Already seen IDs.  More... | |
| Time | m_lifetime | 
| Default lifetime for ID records.  More... | |
Unique packets identification cache used for simple duplicate detection.
Definition at line 43 of file aodv-id-cache.h.
| 
 | inline | 
constructor
| lifetime | the lifetime for added entries | 
Definition at line 50 of file aodv-id-cache.h.
| 
 | inline | 
Return lifetime for existing entries in cache.
Definition at line 78 of file aodv-id-cache.h.
References m_lifetime.
Referenced by ns3::aodv::IdCacheTest::DoRun(), and ns3::aodv::DuplicatePacketDetection::GetLifetime().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| uint32_t ns3::aodv::IdCache::GetSize | ( | ) | 
Definition at line 60 of file aodv-id-cache.cc.
References m_idCache, and Purge().
Referenced by ns3::aodv::IdCacheTest::CheckTimeout1(), ns3::aodv::IdCacheTest::CheckTimeout2(), ns3::aodv::IdCacheTest::CheckTimeout3(), and ns3::aodv::IdCacheTest::DoRun().
 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:| bool ns3::aodv::IdCache::IsDuplicate | ( | Ipv4Address | addr, | 
| uint32_t | id | ||
| ) | 
Check that entry (addr, id) exists in cache.
Add entry, if it doesn't exist.
| addr | the IP address | 
| id | the cache entry ID | 
Definition at line 34 of file aodv-id-cache.cc.
References m_idCache, m_lifetime, ns3::Simulator::Now(), and Purge().
Referenced by ns3::aodv::IdCacheTest::DoRun(), ns3::aodv::DuplicatePacketDetection::IsDuplicate(), ns3::aodv::RoutingProtocol::RecvRequest(), and ns3::aodv::RoutingProtocol::SendRequest().
 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::IdCache::Purge | ( | ) | 
Remove all expired entries.
Definition at line 53 of file aodv-id-cache.cc.
References m_idCache.
Referenced by GetSize(), and IsDuplicate().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Set lifetime for future added entries.
| lifetime | the lifetime for entries | 
Definition at line 70 of file aodv-id-cache.h.
References m_lifetime.
Referenced by ns3::aodv::IdCacheTest::DoRun(), and ns3::aodv::DuplicatePacketDetection::SetLifetime().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Already seen IDs.
Definition at line 110 of file aodv-id-cache.h.
Referenced by GetSize(), IsDuplicate(), and Purge().
| 
 | private | 
Default lifetime for ID records.
Definition at line 112 of file aodv-id-cache.h.
Referenced by GetLifeTime(), IsDuplicate(), and SetLifetime().