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. More...
 
virtual ~RreqTable ()
 Destructor. More...
 
uint32_t CheckUniqueRreqId (Ipv4Address dst)
 
void FindAndUpdate (Ipv4Address dst)
 
bool FindSourceEntry (Ipv4Address src, Ipv4Address dst, uint16_t id)
 
BlackListFindUnidirectional (Ipv4Address neighbor)
 Verify if entry is unidirectional or not(e.g. add this neighbor to "blacklist" for blacklistTimeout period) More...
 
uint32_t GetRreqCnt (Ipv4Address dst)
 
uint32_t GetRreqSize ()
 
void Invalidate ()
 
bool MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTimeout)
 Mark entry as unidirectional (e.g. add this neighbor to "blacklist" for blacklistTimeout period) More...
 
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 Initialize (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. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Attributes

std::vector< BlackListm_blackList
 
uint32_t m_initHopLimit
 
LinkStates m_linkStates
 
uint32_t m_maxRreqId
 
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::list< ReceivedRreqEntrym_sourceRequests
 
std::map< Ipv4Address,
std::list< ReceivedRreqEntry > > 
m_sourceRreqMap
 
Time MaxRequestPeriod
 
Time NonpropRequestTimeout
 
Time RequestPeriod
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

maintain list of RreqTable entry

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 141 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)

The following code generates new request id for each destination

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

References m_maxRreqId, m_rreqIdCache, NS_LOG_DEBUG, NS_LOG_INFO, and NS_LOG_LOGIC.

void ns3::dsr::RreqTable::FindAndUpdate ( Ipv4Address  dst)
bool ns3::dsr::RreqTable::FindSourceEntry ( Ipv4Address  src,
Ipv4Address  dst,
uint16_t  id 
)

Find the source request entry in the route request queue, return false if not found

Parameters
srcthe source address we just received the source request
dstthe destination address the request is targeted at
idthe identification number for this request

Clear the received source request entry

Check if we have found one duplication entry or not

if this entry is not found, we need to save the entry in the cache, and then return false for the check

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

References m_requestIdSize, m_sourceRreqMap, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::dsr::ReceivedRreqEntry::SetDestination(), and ns3::dsr::ReceivedRreqEntry::SetIdentification().

+ Here is the call 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 210 of file dsr-rreq-table.cc.

References m_blackList, and PurgeNeighbor().

+ Here is the call graph for this function:

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

Definition at line 165 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 181 of file dsr-rreq-table.h.

References m_requestIdSize.

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

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

References m_rreqIdCache.

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

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

References m_requestTableSize.

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

Get the type identificator.

Returns
type identificator

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 189 of file dsr-rreq-table.h.

References m_maxRreqId.

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

set the unidirectional entry as QUESTIONABLE state

Definition at line 200 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 successRemove all expired black list entries

Definition at line 225 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 244 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, and NS_LOG_FUNCTION.

Referenced by FindAndUpdate().

+ Here is the caller graph for this function:

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

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

References m_rreqDstMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

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

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

References m_initHopLimit.

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

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

References m_requestIdSize.

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

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

References m_requestTableSize.

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

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

References m_maxRreqId.

Member Data Documentation

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

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

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

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

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

Referenced by GetInitHopLimit(), and SetInitHopLimit().

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

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

Referenced by Invalidate().

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

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

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

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

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

Referenced by FindSourceEntry(), GetRreqIdSize(), and SetRreqIdSize().

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

Definition at line 252 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 264 of file dsr-rreq-table.h.

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

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

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

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

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

Referenced by CheckUniqueRreqId(), and GetRreqSize().

std::list<ReceivedRreqEntry> ns3::dsr::RreqTable::m_sourceRequests
private

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

std::map<Ipv4Address, std::list<ReceivedRreqEntry> > ns3::dsr::RreqTable::m_sourceRreqMap
private

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

Referenced by FindSourceEntry().

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

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

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

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

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

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


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