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) |
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 |
Public Member Functions inherited from ns3::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 (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::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< 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 |
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 | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
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.
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 NS_LOG_DEBUG, NS_LOG_INFO, and NS_LOG_LOGIC.
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 NS_LOG_FUNCTION, and NS_LOG_LOGIC.
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.
|
static |
Get the type identificator.
Definition at line 44 of file dsr-rreq-table.cc.
References ns3::TypeId::SetParent().
void ns3::dsr::RreqTable::Invalidate | ( | ) |
set the unidirectional entry as QUESTIONABLE state
Definition at line 200 of file dsr-rreq-table.cc.
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 ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_LOGIC.