DsrRouteCacheEntry class for entries in the route cache. More...
#include "dsr-rcache.h"
Public Types | |
typedef std::vector< Ipv4Address > | IP_VECTOR |
Define the vector to hold Ip address. More... | |
typedef std::vector< Ipv4Address >::iterator | Iterator |
Define the iterator. More... | |
Public Member Functions | |
DsrRouteCacheEntry (IP_VECTOR const &ip=IP_VECTOR(), Ipv4Address dst=Ipv4Address(), Time exp=Simulator::Now()) | |
Constructor. More... | |
virtual | ~DsrRouteCacheEntry () |
Time | GetBlacklistTimeout () const |
Get blacklist timeout. More... | |
Ipv4Address | GetDestination () const |
Get destination address. More... | |
Time | GetExpireTime () const |
Get expire time. More... | |
IP_VECTOR | GetVector () const |
Get the IP vector. More... | |
void | Invalidate (Time badLinkLifetime) |
Mark entry as "down" (i.e. More... | |
bool | IsUnidirectional () const |
Get unidirectional flag. More... | |
bool | operator== (DsrRouteCacheEntry const &o) const |
Compare the route cache entry. More... | |
void | Print (std::ostream &os) const |
Print necessary fields. More... | |
void | SetBlacklistTimeout (Time t) |
Set blacklist timeout. More... | |
void | SetDestination (Ipv4Address d) |
Set destination address. More... | |
void | SetExpireTime (Time exp) |
Set expire time. More... | |
void | SetUnidirectional (bool u) |
Set unidirectional flag. More... | |
void | SetVector (IP_VECTOR v) |
Sets the IP vector. More... | |
Private Attributes | |
Timer | m_ackTimer |
RREP_ACK timer. More... | |
bool | m_blackListState |
Indicate if this entry is in "blacklist". More... | |
Time | m_blackListTimeout |
Time for which the node is put into the blacklist. More... | |
Ipv4Address | m_dst |
The destination Ip address. More... | |
Time | m_expire |
Expire time for queue entry. More... | |
Ipv4InterfaceAddress | m_iface |
Output interface address. More... | |
Ptr< Ipv4 > | m_ipv4 |
The Ipv4 layer 3. More... | |
Ptr< Ipv4Route > | m_ipv4Route |
The Ipv4 route. More... | |
IP_VECTOR | m_path |
brief The IP address constructed route More... | |
uint8_t | m_reqCount |
Number of route requests. More... | |
DsrRouteCacheEntry class for entries in the route cache.
Definition at line 220 of file dsr-rcache.h.
typedef std::vector<Ipv4Address> ns3::dsr::DsrRouteCacheEntry::IP_VECTOR |
Define the vector to hold Ip address.
Definition at line 223 of file dsr-rcache.h.
typedef std::vector<Ipv4Address>::iterator ns3::dsr::DsrRouteCacheEntry::Iterator |
Define the iterator.
Definition at line 224 of file dsr-rcache.h.
ns3::dsr::DsrRouteCacheEntry::DsrRouteCacheEntry | ( | IP_VECTOR const & | ip = IP_VECTOR () , |
Ipv4Address | dst = Ipv4Address () , |
||
Time | exp = Simulator::Now () |
||
) |
Constructor.
ip | IP_VECTOR |
dst | destination IPv4 address |
exp | expiration time |
Definition at line 106 of file dsr-rcache.cc.
|
virtual |
Definition at line 117 of file dsr-rcache.cc.
|
inline |
Get blacklist timeout.
Definition at line 269 of file dsr-rcache.h.
References m_blackListTimeout.
|
inline |
Get destination address.
Definition at line 277 of file dsr-rcache.h.
References m_dst.
Referenced by ns3::dsr::DsrRouteCache::AddRoute(), DsrCacheEntryTest::DoRun(), and ns3::dsr::DsrRouteCache::FindSameRoute().
|
inline |
Get expire time.
Definition at line 317 of file dsr-rcache.h.
References m_expire, and ns3::Simulator::Now().
Referenced by ns3::dsr::DsrRouteCache::AddRoute(), ns3::dsr::CompareRoutesBoth(), ns3::dsr::CompareRoutesExpire(), DsrCacheEntryTest::DoRun(), and ns3::dsr::DsrRouteCache::FindSameRoute().
|
inline |
Get the IP vector.
Definition at line 293 of file dsr-rcache.h.
References m_path.
Referenced by ns3::dsr::DsrRouting::AddRoute(), ns3::dsr::DsrRouteCache::AddRoute(), ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::CompareRoutesBoth(), ns3::dsr::CompareRoutesHops(), DsrCacheEntryTest::DoRun(), ns3::dsr::DsrRouteCache::FindSameRoute(), ns3::dsr::DsrRouteCache::LookupRoute_Link(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrRouting::RouteRequestTimerExpire(), ns3::dsr::DsrRouting::SalvagePacket(), ns3::dsr::DsrRouting::Send(), and ns3::dsr::DsrRouting::SendUnreachError().
void ns3::dsr::DsrRouteCacheEntry::Invalidate | ( | Time | badLinkLifetime | ) |
Mark entry as "down" (i.e.
disable it)
badLinkLifetime | Time before purging the link for real. |
Definition at line 122 of file dsr-rcache.cc.
References m_expire, m_reqCount, and ns3::Simulator::Now().
|
inline |
Get unidirectional flag.
Definition at line 253 of file dsr-rcache.h.
References m_blackListState.
|
inline |
Compare the route cache entry.
o | entry to compare |
Definition at line 332 of file dsr-rcache.h.
void ns3::dsr::DsrRouteCacheEntry::Print | ( | std::ostream & | os | ) | const |
Print necessary fields.
os | the output stream |
Definition at line 129 of file dsr-rcache.cc.
References m_dst, m_expire, and ns3::Simulator::Now().
|
inline |
Set blacklist timeout.
t | the blacklist timeout |
Definition at line 261 of file dsr-rcache.h.
References m_blackListTimeout.
|
inline |
Set destination address.
d | the destination IP address |
Definition at line 285 of file dsr-rcache.h.
References m_dst.
Referenced by ns3::dsr::DsrRouteCache::DeleteAllRoutesIncludeLink(), DsrCacheEntryTest::DoRun(), ns3::dsr::DsrRouteCache::LookupRoute(), and ns3::dsr::DsrRouteCache::LookupRoute_Link().
|
inline |
Set expire time.
exp | the expire time |
Definition at line 309 of file dsr-rcache.h.
References m_expire, and ns3::Simulator::Now().
Referenced by ns3::dsr::DsrRouteCache::DeleteAllRoutesIncludeLink(), DsrCacheEntryTest::DoRun(), ns3::dsr::DsrRouteCache::LookupRoute(), ns3::dsr::DsrRouteCache::LookupRoute_Link(), and ns3::dsr::DsrRouteCache::UpdateRouteEntry().
|
inline |
Set unidirectional flag.
u | the unidirectional flag |
Definition at line 245 of file dsr-rcache.h.
References m_blackListState.
|
inline |
Sets the IP vector.
v | the IP vector |
Definition at line 301 of file dsr-rcache.h.
References m_path.
Referenced by ns3::dsr::DsrRouteCache::DeleteAllRoutesIncludeLink(), DsrCacheEntryTest::DoRun(), ns3::dsr::DsrRouteCache::LookupRoute(), and ns3::dsr::DsrRouteCache::LookupRoute_Link().
|
private |
RREP_ACK timer.
Definition at line 364 of file dsr-rcache.h.
|
private |
Indicate if this entry is in "blacklist".
Definition at line 370 of file dsr-rcache.h.
Referenced by IsUnidirectional(), and SetUnidirectional().
|
private |
Time for which the node is put into the blacklist.
Definition at line 371 of file dsr-rcache.h.
Referenced by GetBlacklistTimeout(), and SetBlacklistTimeout().
|
private |
The destination Ip address.
Definition at line 365 of file dsr-rcache.h.
Referenced by GetDestination(), Print(), and SetDestination().
|
private |
Expire time for queue entry.
Definition at line 367 of file dsr-rcache.h.
Referenced by GetExpireTime(), Invalidate(), Print(), and SetExpireTime().
|
private |
Output interface address.
Definition at line 368 of file dsr-rcache.h.
The Ipv4 layer 3.
Definition at line 373 of file dsr-rcache.h.
The Ipv4 route.
Definition at line 372 of file dsr-rcache.h.
|
private |
brief The IP address constructed route
Definition at line 366 of file dsr-rcache.h.
Referenced by GetVector(), operator==(), and SetVector().
|
private |