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

maintain list of RreqTable entry More...

#include <dsr-rreq-table.h>

+ Inheritance diagram for ns3::dsr::RreqTable:
+ Collaboration diagram for ns3::dsr::RreqTable:

Classes

struct  IsExpired

Public Member Functions

 RreqTable ()
 Constructor.
virtual ~RreqTable ()
 Destructor.
uint32_t CheckUniqueRreqId (Ipv4Address dst)
void FindAndUpdate (Ipv4Address dst)
BlackListFindUnidirectional (Ipv4Address neighbor)
uint32_t GetRreqCnt (Ipv4Address dst)
uint32_t GetRreqSize ()
void Invalidate ()
bool MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTimeout)
void PurgeNeighbor ()
void RemoveLeastExpire (std::map< Ipv4Address, RreqTableEntry > &rreqDstMap)
void RemoveRreqEntry (Ipv4Address dst)
void SetInitHopLimit (uint32_t hl)
uint32_t GetInitHopLimit () const
void SetRreqTableSize (uint32_t rt)
uint32_t GetRreqTableSize () const
void SetRreqIdSize (uint32_t id)
uint32_t GetRreqIdSize () const
void SetUniqueRreqIdSize (uint32_t uid)
uint32_t GetUniqueRreqIdSize () const
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

Private Attributes

std::vector< BlackListm_blackList
uint32_t m_initHopLimit
LinkStates m_linkStates
uint32_t m_maxRreqId
Timer m_ntimer
uint32_t m_requestIdSize
uint32_t m_requestTableSize
std::map< Ipv4Address,
RreqTableEntry
m_rreqDstMap
Time m_rreqEntryExpire
std::map< Ipv4Address, uint32_t > m_rreqIdCache
std::map< Ipv4Address,
std::list< SourceRreqEntry > > 
m_rreqMap
std::list< SourceRreqEntrym_sourceRreq
Time MaxRequestPeriod
uint32_t MaxRequestRexmt
Time NonpropRequestTimeout
Time RequestPeriod

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoDispose (void)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

maintain list of RreqTable entry

Definition at line 88 of file dsr-rreq-table.h.

Constructor & Destructor Documentation

ns3::dsr::RreqTable::RreqTable ( )

Constructor.

Definition at line 53 of file dsr-rreq-table.cc.

ns3::dsr::RreqTable::~RreqTable ( )
virtual

Destructor.

Definition at line 58 of file dsr-rreq-table.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

uint32_t ns3::dsr::RreqTable::CheckUniqueRreqId ( Ipv4Address  dst)

This part takes care of the route request ID initialized from a specific source to one destination Essentially a counter

Definition at line 160 of file dsr-rreq-table.cc.

References m_maxRreqId, m_rreqIdCache, NS_LOG_DEBUG, and NS_LOG_LOGIC.

Referenced by ns3::dsr::DsrRouting::SendErrorRequest(), and ns3::dsr::DsrRouting::SendInitialRequest().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::FindAndUpdate ( Ipv4Address  dst)

Definition at line 84 of file dsr-rreq-table.cc.

References ns3::dsr::RreqTableEntry::m_expire, ns3::dsr::RreqTableEntry::m_reqNo, m_requestTableSize, m_rreqDstMap, ns3::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, and RemoveLeastExpire().

Referenced by ns3::dsr::DsrRouting::RouteRequestTimerExpire().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BlackList * ns3::dsr::RreqTable::FindUnidirectional ( Ipv4Address  neighbor)

Verify if entry is unidirectional or not(e.g. add this neighbor to "blacklist" for blacklistTimeout period)

Parameters
neighbor- neighbor address link to which assumed to be unidirectional
Returns
true on success

Definition at line 213 of file dsr-rreq-table.cc.

References m_blackList, and PurgeNeighbor().

Referenced by ns3::dsr::DsrRouting::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::dsr::RreqTable::GetInitHopLimit ( ) const
inline

Definition at line 112 of file dsr-rreq-table.h.

References m_initHopLimit.

uint32_t ns3::dsr::RreqTable::GetRreqCnt ( Ipv4Address  dst)
uint32_t ns3::dsr::RreqTable::GetRreqIdSize ( ) const
inline

Definition at line 128 of file dsr-rreq-table.h.

References m_requestIdSize.

uint32_t ns3::dsr::RreqTable::GetRreqSize ( )

Definition at line 192 of file dsr-rreq-table.cc.

References m_rreqIdCache.

uint32_t ns3::dsr::RreqTable::GetRreqTableSize ( ) const
inline

Definition at line 120 of file dsr-rreq-table.h.

References m_requestTableSize.

TypeId ns3::dsr::RreqTable::GetTypeId ( void  )
static

Get the type identificator.

This method returns the TypeId associated to ns3::dsr::RreqTable.

Returns
type identificator

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.

Definition at line 44 of file dsr-rreq-table.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

uint32_t ns3::dsr::RreqTable::GetUniqueRreqIdSize ( ) const
inline

Definition at line 136 of file dsr-rreq-table.h.

References m_maxRreqId.

void ns3::dsr::RreqTable::Invalidate ( )

This part takes care of black list which can save unidirectional link information

Definition at line 203 of file dsr-rreq-table.cc.

References m_linkStates, and ns3::dsr::QUESTIONABLE.

bool ns3::dsr::RreqTable::MarkLinkAsUnidirectional ( Ipv4Address  neighbor,
Time  blacklistTimeout 
)

Mark entry as unidirectional (e.g. add this neighbor to "blacklist" for blacklistTimeout period)

Parameters
neighbor- neighbor address link to which assumed to be unidirectional
blacklistTimeout- time for which the neighboring node is put into the blacklist
Returns
true on success

Definition at line 228 of file dsr-rreq-table.cc.

References m_blackList, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_LOGIC, and PurgeNeighbor().

+ Here is the call graph for this function:

void ns3::dsr::RreqTable::PurgeNeighbor ( )

Definition at line 247 of file dsr-rreq-table.cc.

References m_blackList.

Referenced by FindUnidirectional(), and MarkLinkAsUnidirectional().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::RemoveLeastExpire ( std::map< Ipv4Address, RreqTableEntry > &  rreqDstMap)

Definition at line 64 of file dsr-rreq-table.cc.

References ns3::dsr::RreqTableEntry::m_expire, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by FindAndUpdate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::RemoveRreqEntry ( Ipv4Address  dst)

Definition at line 118 of file dsr-rreq-table.cc.

References m_rreqDstMap, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::dsr::DsrRouting::CancelRreqTimer().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::SetInitHopLimit ( uint32_t  hl)
inline

Definition at line 108 of file dsr-rreq-table.h.

References m_initHopLimit.

Referenced by ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::SetRreqIdSize ( uint32_t  id)
inline

Definition at line 124 of file dsr-rreq-table.h.

References m_requestIdSize.

Referenced by ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::SetRreqTableSize ( uint32_t  rt)
inline

Definition at line 116 of file dsr-rreq-table.h.

References m_requestTableSize.

Referenced by ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

void ns3::dsr::RreqTable::SetUniqueRreqIdSize ( uint32_t  uid)
inline

Definition at line 132 of file dsr-rreq-table.h.

References m_maxRreqId.

Referenced by ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<BlackList> ns3::dsr::RreqTable::m_blackList
private

Definition at line 211 of file dsr-rreq-table.h.

Referenced by FindUnidirectional(), MarkLinkAsUnidirectional(), and PurgeNeighbor().

uint32_t ns3::dsr::RreqTable::m_initHopLimit
private

Definition at line 193 of file dsr-rreq-table.h.

Referenced by GetInitHopLimit(), and SetInitHopLimit().

LinkStates ns3::dsr::RreqTable::m_linkStates
private

Definition at line 201 of file dsr-rreq-table.h.

Referenced by Invalidate().

uint32_t ns3::dsr::RreqTable::m_maxRreqId
private

Definition at line 199 of file dsr-rreq-table.h.

Referenced by CheckUniqueRreqId(), GetUniqueRreqIdSize(), and SetUniqueRreqIdSize().

Timer ns3::dsr::RreqTable::m_ntimer
private

Definition at line 181 of file dsr-rreq-table.h.

uint32_t ns3::dsr::RreqTable::m_requestIdSize
private

Definition at line 197 of file dsr-rreq-table.h.

Referenced by GetRreqIdSize(), and SetRreqIdSize().

uint32_t ns3::dsr::RreqTable::m_requestTableSize
private

Definition at line 195 of file dsr-rreq-table.h.

Referenced by FindAndUpdate(), GetRreqTableSize(), and SetRreqTableSize().

std::map<Ipv4Address, RreqTableEntry > ns3::dsr::RreqTable::m_rreqDstMap
private

Definition at line 207 of file dsr-rreq-table.h.

Referenced by FindAndUpdate(), GetRreqCnt(), and RemoveRreqEntry().

Time ns3::dsr::RreqTable::m_rreqEntryExpire
private

Definition at line 191 of file dsr-rreq-table.h.

std::map<Ipv4Address, uint32_t> ns3::dsr::RreqTable::m_rreqIdCache
private

Definition at line 205 of file dsr-rreq-table.h.

Referenced by CheckUniqueRreqId(), and GetRreqSize().

std::map<Ipv4Address, std::list<SourceRreqEntry> > ns3::dsr::RreqTable::m_rreqMap
private

Definition at line 209 of file dsr-rreq-table.h.

std::list<SourceRreqEntry> ns3::dsr::RreqTable::m_sourceRreq
private

Definition at line 203 of file dsr-rreq-table.h.

Time ns3::dsr::RreqTable::MaxRequestPeriod
private

Definition at line 185 of file dsr-rreq-table.h.

uint32_t ns3::dsr::RreqTable::MaxRequestRexmt
private

Definition at line 183 of file dsr-rreq-table.h.

Time ns3::dsr::RreqTable::NonpropRequestTimeout
private

Definition at line 189 of file dsr-rreq-table.h.

Time ns3::dsr::RreqTable::RequestPeriod
private

Definition at line 187 of file dsr-rreq-table.h.


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