maintain list of RreqTable entry More...
#include <dsr-rreq-table.h>
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) |
BlackList * | FindUnidirectional (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 |
![]() | |
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) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
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 TypeId | GetTypeId (void) |
![]() | |
static void | Cleanup (void) |
![]() | |
static TypeId | GetTypeId (void) |
Private Attributes | |
std::vector< BlackList > | m_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< ReceivedRreqEntry > | m_sourceRequests |
std::map< Ipv4Address, std::list< ReceivedRreqEntry > > | m_sourceRreqMap |
Time | MaxRequestPeriod |
Time | NonpropRequestTimeout |
Time | RequestPeriod |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
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.
ns3::dsr::RreqTable::RreqTable | ( | ) |
Constructor.
Definition at line 53 of file dsr-rreq-table.cc.
|
virtual |
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 | ) |
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::Simulator::Now(), NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, and RemoveLeastExpire().
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
src | the source address we just received the source request |
dst | the destination address the request is targeted at |
id | the 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().
BlackList * ns3::dsr::RreqTable::FindUnidirectional | ( | Ipv4Address | neighbor | ) |
Verify if entry is unidirectional or not(e.g. add this neighbor to "blacklist" for blacklistTimeout period)
neighbor | - neighbor address link to which assumed to be unidirectional |
Definition at line 210 of file dsr-rreq-table.cc.
References m_blackList, and PurgeNeighbor().
|
inline |
Definition at line 165 of file dsr-rreq-table.h.
References m_initHopLimit.
uint32_t ns3::dsr::RreqTable::GetRreqCnt | ( | Ipv4Address | dst | ) |
Definition at line 134 of file dsr-rreq-table.cc.
References ns3::dsr::RreqTableEntry::m_reqNo, m_rreqDstMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
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.
|
inline |
Definition at line 173 of file dsr-rreq-table.h.
References m_requestTableSize.
|
static |
Get the type identificator.
Definition at line 44 of file dsr-rreq-table.cc.
References ns3::TypeId::SetParent().
|
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)
neighbor | - neighbor address link to which assumed to be unidirectional |
blacklistTimeout | - time for which the neighboring node is put into the blacklist |
Definition at line 225 of file dsr-rreq-table.cc.
References m_blackList, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_LOGIC, and PurgeNeighbor().
void ns3::dsr::RreqTable::PurgeNeighbor | ( | ) |
Definition at line 244 of file dsr-rreq-table.cc.
References m_blackList.
Referenced by FindUnidirectional(), and MarkLinkAsUnidirectional().
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().
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.
|
inline |
Definition at line 161 of file dsr-rreq-table.h.
References m_initHopLimit.
|
inline |
Definition at line 177 of file dsr-rreq-table.h.
References m_requestIdSize.
|
inline |
Definition at line 169 of file dsr-rreq-table.h.
References m_requestTableSize.
|
inline |
Definition at line 185 of file dsr-rreq-table.h.
References m_maxRreqId.
|
private |
Definition at line 269 of file dsr-rreq-table.h.
Referenced by FindUnidirectional(), MarkLinkAsUnidirectional(), and PurgeNeighbor().
|
private |
Definition at line 250 of file dsr-rreq-table.h.
Referenced by GetInitHopLimit(), and SetInitHopLimit().
|
private |
Definition at line 258 of file dsr-rreq-table.h.
Referenced by Invalidate().
|
private |
Definition at line 256 of file dsr-rreq-table.h.
Referenced by CheckUniqueRreqId(), GetUniqueRreqIdSize(), and SetUniqueRreqIdSize().
|
private |
Definition at line 254 of file dsr-rreq-table.h.
Referenced by FindSourceEntry(), GetRreqIdSize(), and SetRreqIdSize().
|
private |
Definition at line 252 of file dsr-rreq-table.h.
Referenced by FindAndUpdate(), GetRreqTableSize(), and SetRreqTableSize().
|
private |
Definition at line 264 of file dsr-rreq-table.h.
Referenced by FindAndUpdate(), GetRreqCnt(), and RemoveRreqEntry().
|
private |
Definition at line 248 of file dsr-rreq-table.h.
|
private |
Definition at line 262 of file dsr-rreq-table.h.
Referenced by CheckUniqueRreqId(), and GetRreqSize().
|
private |
Definition at line 260 of file dsr-rreq-table.h.
|
private |
Definition at line 266 of file dsr-rreq-table.h.
Referenced by FindSourceEntry().
|
private |
Definition at line 242 of file dsr-rreq-table.h.
|
private |
Definition at line 246 of file dsr-rreq-table.h.
|
private |
Definition at line 244 of file dsr-rreq-table.h.