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

Routing table entry. More...

#include <aodv-rtable.h>

+ Collaboration diagram for ns3::aodv::RoutingTableEntry:

Public Member Functions

 RoutingTableEntry (Ptr< NetDevice > dev=0, Ipv4Address dst=Ipv4Address(), bool vSeqNo=false, uint32_t m_seqNo=0, Ipv4InterfaceAddress iface=Ipv4InterfaceAddress(), uint16_t hops=0, Ipv4Address nextHop=Ipv4Address(), Time lifetime=Simulator::Now())
 c-to More...
 
 ~RoutingTableEntry ()
 
void Invalidate (Time badLinkLifetime)
 Mark entry as "down" (i.e. disable it) More...
 
bool operator== (Ipv4Address const dst) const
 Compare destination address. More...
 
void Print (Ptr< OutputStreamWrapper > stream) const
 
Precursors management
bool InsertPrecursor (Ipv4Address id)
 Insert precursor in precursor list if it doesn't yet exist in the list. More...
 
bool LookupPrecursor (Ipv4Address id)
 Lookup precursor by address. More...
 
bool DeletePrecursor (Ipv4Address id)
 Delete precursor. More...
 
void DeleteAllPrecursors ()
 Delete all precursors. More...
 
bool IsPrecursorListEmpty () const
 Check that precursor list empty. More...
 
void GetPrecursors (std::vector< Ipv4Address > &prec) const
 Inserts precursors in vector prec if they does not yet exist in vector. More...
 

Private Attributes

bool m_blackListState
 Indicate if this entry is in "blacklist". More...
 
Time m_blackListTimeout
 Time for which the node is put into the blacklist. More...
 
RouteFlags m_flag
 Routing flags: valid, invalid or in search. More...
 
uint16_t m_hops
 Hop Count (number of hops needed to reach destination) More...
 
Ipv4InterfaceAddress m_iface
 Output interface address. More...
 
Ptr< Ipv4Routem_ipv4Route
 Ip route, include. More...
 
Time m_lifeTime
 Expiration or deletion time of the route Lifetime field in the routing table plays dual role – for an active route it is the expiration time, and for an invalid route it is the deletion time. More...
 
std::vector< Ipv4Addressm_precursorList
 List of precursors. More...
 
uint8_t m_reqCount
 Number of route requests. More...
 
Time m_routeRequestTimout
 When I can send another request. More...
 
uint32_t m_seqNo
 Destination Sequence Number, if m_validSeqNo = true. More...
 
bool m_validSeqNo
 Valid Destination Sequence Number flag. More...
 

Fields

Timer m_ackTimer
 RREP_ACK timer. More...
 
Ipv4Address GetDestination () const
 RREP_ACK timer. More...
 
Ptr< Ipv4RouteGetRoute () const
 RREP_ACK timer. More...
 
void SetRoute (Ptr< Ipv4Route > r)
 RREP_ACK timer. More...
 
void SetNextHop (Ipv4Address nextHop)
 RREP_ACK timer. More...
 
Ipv4Address GetNextHop () const
 RREP_ACK timer. More...
 
void SetOutputDevice (Ptr< NetDevice > dev)
 RREP_ACK timer. More...
 
Ptr< NetDeviceGetOutputDevice () const
 RREP_ACK timer. More...
 
Ipv4InterfaceAddress GetInterface () const
 RREP_ACK timer. More...
 
void SetInterface (Ipv4InterfaceAddress iface)
 RREP_ACK timer. More...
 
void SetValidSeqNo (bool s)
 RREP_ACK timer. More...
 
bool GetValidSeqNo () const
 RREP_ACK timer. More...
 
void SetSeqNo (uint32_t sn)
 RREP_ACK timer. More...
 
uint32_t GetSeqNo () const
 RREP_ACK timer. More...
 
void SetHop (uint16_t hop)
 RREP_ACK timer. More...
 
uint16_t GetHop () const
 RREP_ACK timer. More...
 
void SetLifeTime (Time lt)
 RREP_ACK timer. More...
 
Time GetLifeTime () const
 RREP_ACK timer. More...
 
void SetFlag (RouteFlags flag)
 RREP_ACK timer. More...
 
RouteFlags GetFlag () const
 RREP_ACK timer. More...
 
void SetRreqCnt (uint8_t n)
 RREP_ACK timer. More...
 
uint8_t GetRreqCnt () const
 RREP_ACK timer. More...
 
void IncrementRreqCnt ()
 RREP_ACK timer. More...
 
void SetUnidirectional (bool u)
 RREP_ACK timer. More...
 
bool IsUnidirectional () const
 RREP_ACK timer. More...
 
void SetBalcklistTimeout (Time t)
 RREP_ACK timer. More...
 
Time GetBlacklistTimeout () const
 RREP_ACK timer. More...
 

Detailed Description

Routing table entry.

Definition at line 59 of file aodv-rtable.h.

Constructor & Destructor Documentation

ns3::aodv::RoutingTableEntry::RoutingTableEntry ( Ptr< NetDevice dev = 0,
Ipv4Address  dst = Ipv4Address (),
bool  vSeqNo = false,
uint32_t  m_seqNo = 0,
Ipv4InterfaceAddress  iface = Ipv4InterfaceAddress (),
uint16_t  hops = 0,
Ipv4Address  nextHop = Ipv4Address (),
Time  lifetime = Simulator::Now () 
)
ns3::aodv::RoutingTableEntry::~RoutingTableEntry ( )

Definition at line 60 of file aodv-rtable.cc.

Member Function Documentation

void ns3::aodv::RoutingTableEntry::DeleteAllPrecursors ( )

Delete all precursors.

Definition at line 114 of file aodv-rtable.cc.

References m_precursorList, and NS_LOG_FUNCTION.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::DeletePrecursor ( Ipv4Address  id)

Delete precursor.

Parameters
idprecursor address
Returns
true on success

Definition at line 95 of file aodv-rtable.cc.

References m_precursorList, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the caller graph for this function:

Time ns3::aodv::RoutingTableEntry::GetBlacklistTimeout ( ) const
inline

RREP_ACK timer.

Definition at line 131 of file aodv-rtable.h.

References m_blackListTimeout.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the caller graph for this function:

Ipv4Address ns3::aodv::RoutingTableEntry::GetDestination ( ) const
inline
uint16_t ns3::aodv::RoutingTableEntry::GetHop ( ) const
inline
Time ns3::aodv::RoutingTableEntry::GetLifeTime ( ) const
inline
Ptr<NetDevice> ns3::aodv::RoutingTableEntry::GetOutputDevice ( ) const
inline

RREP_ACK timer.

Definition at line 112 of file aodv-rtable.h.

References ns3::Ipv4Route::GetOutputDevice(), and m_ipv4Route.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::UpdateRouteToNeighbor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::GetPrecursors ( std::vector< Ipv4Address > &  prec) const

Inserts precursors in vector prec if they does not yet exist in vector.

Definition at line 127 of file aodv-rtable.cc.

References IsPrecursorListEmpty(), m_precursorList, and NS_LOG_FUNCTION.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::RoutingProtocol::RecvError(), and ns3::aodv::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr<Ipv4Route> ns3::aodv::RoutingTableEntry::GetRoute ( ) const
inline
uint8_t ns3::aodv::RoutingTableEntry::GetRreqCnt ( ) const
inline

RREP_ACK timer.

Definition at line 126 of file aodv-rtable.h.

References m_reqCount.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::RoutingProtocol::RouteRequestTimerExpire(), and ns3::aodv::RoutingProtocol::ScheduleRreqRetry().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::GetValidSeqNo ( ) const
inline
void ns3::aodv::RoutingTableEntry::IncrementRreqCnt ( )
inline

RREP_ACK timer.

Definition at line 127 of file aodv-rtable.h.

References m_reqCount.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::ScheduleRreqRetry().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::InsertPrecursor ( Ipv4Address  id)

Insert precursor in precursor list if it doesn't yet exist in the list.

Parameters
idprecursor address
Returns
true on success

Definition at line 65 of file aodv-rtable.cc.

References LookupPrecursor(), m_precursorList, and NS_LOG_FUNCTION.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::AodvRtableTest::DoRun(), ns3::aodv::RoutingProtocol::RecvReply(), and ns3::aodv::RoutingProtocol::SendReplyByIntermediateNode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::Invalidate ( Time  badLinkLifetime)

Mark entry as "down" (i.e. disable it)

Definition at line 148 of file aodv-rtable.cc.

References ns3::Time::GetSeconds(), ns3::aodv::INVALID, m_flag, m_lifeTime, m_reqCount, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::IsPrecursorListEmpty ( ) const

Check that precursor list empty.

Returns
true if precursor list empty

Definition at line 121 of file aodv-rtable.cc.

References m_precursorList.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and GetPrecursors().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::IsUnidirectional ( ) const
inline

RREP_ACK timer.

Definition at line 129 of file aodv-rtable.h.

References m_blackListState.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::AodvRtableTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::LookupPrecursor ( Ipv4Address  id)

Lookup precursor by address.

Parameters
idprecursor address
Returns
true on success

Definition at line 78 of file aodv-rtable.cc.

References m_precursorList, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and InsertPrecursor().

+ Here is the caller graph for this function:

bool ns3::aodv::RoutingTableEntry::operator== ( Ipv4Address const  dst) const
inline

Compare destination address.

Returns
true if equal

Definition at line 140 of file aodv-rtable.h.

References ns3::Ipv4Route::GetDestination(), and m_ipv4Route.

+ Here is the call graph for this function:

void ns3::aodv::RoutingTableEntry::SetBalcklistTimeout ( Time  t)
inline

RREP_ACK timer.

Definition at line 130 of file aodv-rtable.h.

References m_blackListTimeout.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetFlag ( RouteFlags  flag)
inline

RREP_ACK timer.

Definition at line 123 of file aodv-rtable.h.

References m_flag.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::RoutingProtocol::RecvReplyAck(), ns3::aodv::RoutingProtocol::RecvRequest(), and ns3::aodv::RoutingProtocol::SendRequest().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetHop ( uint16_t  hop)
inline

RREP_ACK timer.

Definition at line 119 of file aodv-rtable.h.

References m_hops.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), ns3::aodv::AodvRtableTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetInterface ( Ipv4InterfaceAddress  iface)
inline

RREP_ACK timer.

Definition at line 114 of file aodv-rtable.h.

References m_iface.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetLifeTime ( Time  lt)
inline
void ns3::aodv::RoutingTableEntry::SetNextHop ( Ipv4Address  nextHop)
inline

RREP_ACK timer.

Definition at line 109 of file aodv-rtable.h.

References m_ipv4Route, and ns3::Ipv4Route::SetGateway().

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetOutputDevice ( Ptr< NetDevice dev)
inline

RREP_ACK timer.

Definition at line 111 of file aodv-rtable.h.

References m_ipv4Route, and ns3::Ipv4Route::SetOutputDevice().

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetRoute ( Ptr< Ipv4Route r)
inline

RREP_ACK timer.

Definition at line 108 of file aodv-rtable.h.

References m_ipv4Route.

void ns3::aodv::RoutingTableEntry::SetRreqCnt ( uint8_t  n)
inline

RREP_ACK timer.

Definition at line 125 of file aodv-rtable.h.

References m_reqCount.

Referenced by ns3::aodv::RoutingTable::AddRoute(), ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::UpdateRouteLifeTime().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetSeqNo ( uint32_t  sn)
inline

RREP_ACK timer.

Definition at line 117 of file aodv-rtable.h.

References m_seqNo.

Referenced by ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetUnidirectional ( bool  u)
inline

RREP_ACK timer.

Definition at line 128 of file aodv-rtable.h.

References m_blackListState.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun().

+ Here is the caller graph for this function:

void ns3::aodv::RoutingTableEntry::SetValidSeqNo ( bool  s)
inline

RREP_ACK timer.

Definition at line 115 of file aodv-rtable.h.

References m_validSeqNo, and s.

Referenced by ns3::aodv::AodvRtableEntryTest::DoRun(), and ns3::aodv::RoutingProtocol::RecvRequest().

+ Here is the caller graph for this function:

Member Data Documentation

Timer ns3::aodv::RoutingTableEntry::m_ackTimer
bool ns3::aodv::RoutingTableEntry::m_blackListState
private

Indicate if this entry is in "blacklist".

Definition at line 179 of file aodv-rtable.h.

Referenced by IsUnidirectional(), and SetUnidirectional().

Time ns3::aodv::RoutingTableEntry::m_blackListTimeout
private

Time for which the node is put into the blacklist.

Definition at line 181 of file aodv-rtable.h.

Referenced by GetBlacklistTimeout(), and SetBalcklistTimeout().

RouteFlags ns3::aodv::RoutingTableEntry::m_flag
private

Routing flags: valid, invalid or in search.

Definition at line 170 of file aodv-rtable.h.

Referenced by GetFlag(), Invalidate(), Print(), and SetFlag().

uint16_t ns3::aodv::RoutingTableEntry::m_hops
private

Hop Count (number of hops needed to reach destination)

Definition at line 152 of file aodv-rtable.h.

Referenced by GetHop(), Print(), and SetHop().

Ipv4InterfaceAddress ns3::aodv::RoutingTableEntry::m_iface
private

Output interface address.

Definition at line 168 of file aodv-rtable.h.

Referenced by GetInterface(), Print(), RoutingTableEntry(), and SetInterface().

Ptr<Ipv4Route> ns3::aodv::RoutingTableEntry::m_ipv4Route
private

Ip route, include.

  • destination address
  • source address
  • next hop address (gateway)
  • output device

Definition at line 166 of file aodv-rtable.h.

Referenced by GetDestination(), GetNextHop(), GetOutputDevice(), GetRoute(), operator==(), Print(), RoutingTableEntry(), SetNextHop(), SetOutputDevice(), and SetRoute().

Time ns3::aodv::RoutingTableEntry::m_lifeTime
private

Expiration or deletion time of the route Lifetime field in the routing table plays dual role – for an active route it is the expiration time, and for an invalid route it is the deletion time.

Definition at line 159 of file aodv-rtable.h.

Referenced by GetLifeTime(), Invalidate(), Print(), and SetLifeTime().

std::vector<Ipv4Address> ns3::aodv::RoutingTableEntry::m_precursorList
private
uint8_t ns3::aodv::RoutingTableEntry::m_reqCount
private

Number of route requests.

Definition at line 177 of file aodv-rtable.h.

Referenced by GetRreqCnt(), IncrementRreqCnt(), Invalidate(), and SetRreqCnt().

Time ns3::aodv::RoutingTableEntry::m_routeRequestTimout
private

When I can send another request.

Definition at line 175 of file aodv-rtable.h.

uint32_t ns3::aodv::RoutingTableEntry::m_seqNo
private

Destination Sequence Number, if m_validSeqNo = true.

Definition at line 150 of file aodv-rtable.h.

Referenced by GetSeqNo(), and SetSeqNo().

bool ns3::aodv::RoutingTableEntry::m_validSeqNo
private

Valid Destination Sequence Number flag.

Definition at line 148 of file aodv-rtable.h.

Referenced by GetValidSeqNo(), and SetValidSeqNo().


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