A Discrete-Event Network Simulator
API
ns3::dsr::DsrRouteCacheEntry Class Reference

#include "dsr-rcache.h"

+ Collaboration diagram for ns3::dsr::DsrRouteCacheEntry:

Public Types

typedef std::vector< Ipv4AddressIP_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())
 
virtual ~DsrRouteCacheEntry ()
 
Time GetBlacklistTimeout () const
 
Ipv4Address GetDestination () const
 
Time GetExpireTime () const
 
IP_VECTOR GetVector () const
 
void Invalidate (Time badLinkLifetime)
 Mark entry as "down" (i.e. disable it) More...
 
bool IsUnidirectional () const
 
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)
 
void SetDestination (Ipv4Address d)
 
void SetExpireTime (Time exp)
 
void SetUnidirectional (bool u)
 
void SetVector (IP_VECTOR v)
 

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< Ipv4m_ipv4
 The Ipv4 layer 3. More...
 
Ptr< Ipv4Routem_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...
 

Detailed Description

Definition at line 174 of file dsr-rcache.h.

Member Typedef Documentation

Define the vector to hold Ip address.

Definition at line 177 of file dsr-rcache.h.

typedef std::vector<Ipv4Address>::iterator ns3::dsr::DsrRouteCacheEntry::Iterator

Define the iterator.

Definition at line 178 of file dsr-rcache.h.

Constructor & Destructor Documentation

ns3::dsr::DsrRouteCacheEntry::DsrRouteCacheEntry ( IP_VECTOR const &  ip = IP_VECTOR (),
Ipv4Address  dst = Ipv4Address (),
Time  exp = Simulator::Now () 
)

Definition at line 106 of file dsr-rcache.cc.

ns3::dsr::DsrRouteCacheEntry::~DsrRouteCacheEntry ( )
virtual

Definition at line 117 of file dsr-rcache.cc.

Member Function Documentation

Time ns3::dsr::DsrRouteCacheEntry::GetBlacklistTimeout ( ) const
inline

Definition at line 199 of file dsr-rcache.h.

References m_blackListTimeout.

Ipv4Address ns3::dsr::DsrRouteCacheEntry::GetDestination ( ) const
inline

Definition at line 203 of file dsr-rcache.h.

References m_dst.

Referenced by ns3::dsr::DsrRouteCache::AddRoute(), DsrCacheEntryTest::DoRun(), and ns3::dsr::DsrRouteCache::FindSameRoute().

+ Here is the caller graph for this function:

Time ns3::dsr::DsrRouteCacheEntry::GetExpireTime ( ) const
inline

Definition at line 223 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dsr::DsrRouteCacheEntry::Invalidate ( Time  badLinkLifetime)

Mark entry as "down" (i.e. disable it)

Definition at line 122 of file dsr-rcache.cc.

References m_expire, m_reqCount, and ns3::Simulator::Now().

+ Here is the call graph for this function:

bool ns3::dsr::DsrRouteCacheEntry::IsUnidirectional ( ) const
inline

Definition at line 191 of file dsr-rcache.h.

References m_blackListState.

bool ns3::dsr::DsrRouteCacheEntry::operator== ( DsrRouteCacheEntry const &  o) const
inline

Compare the route cache entry.

Returns
true if equal

Definition at line 236 of file dsr-rcache.h.

References m_path, and NS_ASSERT.

void ns3::dsr::DsrRouteCacheEntry::Print ( std::ostream &  os) const

Print necessary fields.

Definition at line 129 of file dsr-rcache.cc.

References m_dst, m_expire, and ns3::Simulator::Now().

+ Here is the call graph for this function:

void ns3::dsr::DsrRouteCacheEntry::SetBlacklistTimeout ( Time  t)
inline

Definition at line 195 of file dsr-rcache.h.

References m_blackListTimeout.

void ns3::dsr::DsrRouteCacheEntry::SetDestination ( Ipv4Address  d)
inline
void ns3::dsr::DsrRouteCacheEntry::SetExpireTime ( Time  exp)
inline
void ns3::dsr::DsrRouteCacheEntry::SetUnidirectional ( bool  u)
inline

Definition at line 187 of file dsr-rcache.h.

References m_blackListState.

void ns3::dsr::DsrRouteCacheEntry::SetVector ( IP_VECTOR  v)
inline

Member Data Documentation

Timer ns3::dsr::DsrRouteCacheEntry::m_ackTimer
private

RREP_ACK timer.

Definition at line 269 of file dsr-rcache.h.

bool ns3::dsr::DsrRouteCacheEntry::m_blackListState
private

Indicate if this entry is in "blacklist".

Definition at line 275 of file dsr-rcache.h.

Referenced by IsUnidirectional(), and SetUnidirectional().

Time ns3::dsr::DsrRouteCacheEntry::m_blackListTimeout
private

Time for which the node is put into the blacklist.

Definition at line 276 of file dsr-rcache.h.

Referenced by GetBlacklistTimeout(), and SetBlacklistTimeout().

Ipv4Address ns3::dsr::DsrRouteCacheEntry::m_dst
private

The destination Ip address.

Definition at line 270 of file dsr-rcache.h.

Referenced by GetDestination(), Print(), and SetDestination().

Time ns3::dsr::DsrRouteCacheEntry::m_expire
private

Expire time for queue entry.

Definition at line 272 of file dsr-rcache.h.

Referenced by GetExpireTime(), Invalidate(), Print(), and SetExpireTime().

Ipv4InterfaceAddress ns3::dsr::DsrRouteCacheEntry::m_iface
private

Output interface address.

Definition at line 273 of file dsr-rcache.h.

Ptr<Ipv4> ns3::dsr::DsrRouteCacheEntry::m_ipv4
private

The Ipv4 layer 3.

Definition at line 278 of file dsr-rcache.h.

Ptr<Ipv4Route> ns3::dsr::DsrRouteCacheEntry::m_ipv4Route
private

The Ipv4 route.

Definition at line 277 of file dsr-rcache.h.

IP_VECTOR ns3::dsr::DsrRouteCacheEntry::m_path
private

brief The IP address constructed route

Definition at line 271 of file dsr-rcache.h.

Referenced by GetVector(), operator==(), and SetVector().

uint8_t ns3::dsr::DsrRouteCacheEntry::m_reqCount
private

Number of route requests.

Definition at line 274 of file dsr-rcache.h.

Referenced by Invalidate().


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