maintain list of RreqTable entry More...
#include <dsr-rreq-table.h>
Classes | |
struct | IsExpired |
Public Member Functions | |
RreqTable () | |
Constructor. | |
virtual | ~RreqTable () |
Destructor. | |
uint32_t | CheckUniqueRreqId (Ipv4Address dst) |
void | FindAndUpdate (Ipv4Address dst) |
BlackList * | FindUnidirectional (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 |
![]() | |
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) |
![]() | |
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. |
Private Attributes | |
std::vector< BlackList > | m_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< SourceRreqEntry > | m_sourceRreq |
Time | MaxRequestPeriod |
uint32_t | MaxRequestRexmt |
Time | NonpropRequestTimeout |
Time | RequestPeriod |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
maintain list of RreqTable entry
Definition at line 88 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 | ) |
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().
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().
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 213 of file dsr-rreq-table.cc.
References m_blackList, and PurgeNeighbor().
Referenced by ns3::dsr::DsrRouting::Receive().
|
inline |
Definition at line 112 of file dsr-rreq-table.h.
References m_initHopLimit.
uint32_t ns3::dsr::RreqTable::GetRreqCnt | ( | Ipv4Address | dst | ) |
Definition at line 136 of file dsr-rreq-table.cc.
References ns3::dsr::RreqTableEntry::m_reqNo, m_rreqDstMap, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrRouting::RouteRequestTimerExpire(), ns3::dsr::DsrRouting::ScheduleRreqRetry(), and ns3::dsr::DsrRouting::Send().
|
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.
|
inline |
Definition at line 120 of file dsr-rreq-table.h.
References m_requestTableSize.
|
static |
Get the type identificator.
This method returns the TypeId associated to ns3::dsr::RreqTable.
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().
|
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)
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 228 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 247 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, NS_LOG_FUNCTION, and ns3::Seconds().
Referenced by FindAndUpdate().
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().
|
inline |
Definition at line 108 of file dsr-rreq-table.h.
References m_initHopLimit.
Referenced by ns3::dsr::DsrRouting::Start().
|
inline |
Definition at line 124 of file dsr-rreq-table.h.
References m_requestIdSize.
Referenced by ns3::dsr::DsrRouting::Start().
|
inline |
Definition at line 116 of file dsr-rreq-table.h.
References m_requestTableSize.
Referenced by ns3::dsr::DsrRouting::Start().
|
inline |
Definition at line 132 of file dsr-rreq-table.h.
References m_maxRreqId.
Referenced by ns3::dsr::DsrRouting::Start().
|
private |
Definition at line 211 of file dsr-rreq-table.h.
Referenced by FindUnidirectional(), MarkLinkAsUnidirectional(), and PurgeNeighbor().
|
private |
Definition at line 193 of file dsr-rreq-table.h.
Referenced by GetInitHopLimit(), and SetInitHopLimit().
|
private |
Definition at line 201 of file dsr-rreq-table.h.
Referenced by Invalidate().
|
private |
Definition at line 199 of file dsr-rreq-table.h.
Referenced by CheckUniqueRreqId(), GetUniqueRreqIdSize(), and SetUniqueRreqIdSize().
|
private |
Definition at line 181 of file dsr-rreq-table.h.
|
private |
Definition at line 197 of file dsr-rreq-table.h.
Referenced by GetRreqIdSize(), and SetRreqIdSize().
|
private |
Definition at line 195 of file dsr-rreq-table.h.
Referenced by FindAndUpdate(), GetRreqTableSize(), and SetRreqTableSize().
|
private |
Definition at line 207 of file dsr-rreq-table.h.
Referenced by FindAndUpdate(), GetRreqCnt(), and RemoveRreqEntry().
|
private |
Definition at line 191 of file dsr-rreq-table.h.
|
private |
Definition at line 205 of file dsr-rreq-table.h.
Referenced by CheckUniqueRreqId(), and GetRreqSize().
|
private |
Definition at line 209 of file dsr-rreq-table.h.
|
private |
Definition at line 203 of file dsr-rreq-table.h.
|
private |
Definition at line 185 of file dsr-rreq-table.h.
|
private |
Definition at line 183 of file dsr-rreq-table.h.
|
private |
Definition at line 189 of file dsr-rreq-table.h.
|
private |
Definition at line 187 of file dsr-rreq-table.h.