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

Routing table entry. More...

#include <aodv-rtable.h>

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(), uint16_t channelNo=1)
void Invalidate (Time badLinkLifetime)
 Mark entry as "down" (i.e. disable it)
bool operator== (Ipv4Address const dst) const
 Compare destination address. More...
void Print (Ptr< OutputStreamWrapper > stream) const
Precursors management
bool InsertPrecursor (Ipv4Address id)
bool LookupPrecursor (Ipv4Address id)
bool DeletePrecursor (Ipv4Address id)
 Delete precursor. More...
void DeleteAllPrecursors ()
 Delete all precursors.
bool IsPrecursorListEmpty () const
void GetPrecursors (std::vector< Ipv4Address > &prec) const

Private Attributes

bool m_blackListState
 Indicate if this entry is in "blacklist".
Time m_blackListTimeout
 Time for which the node is put into the blacklist.
uint16_t m_channel
 Channel number for route's destination.
RouteFlags m_flag
 Routing flags: valid, invalid or in search.
uint16_t m_hops
 Hop Count (number of hops needed to reach destination)
Ipv4InterfaceAddress m_iface
 Output interface address.
Ptr< Ipv4Routem_ipv4Route
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.
std::vector< Ipv4Addressm_precursorList
 List of precursors.
uint8_t m_reqCount
 Number of route requests.
Time m_routeRequestTimout
 When I can send another request.
uint32_t m_seqNo
 Destination Sequence Number, if m_validSeqNo = true.
bool m_validSeqNo
 Valid Destination Sequence Number flag.


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

Detailed Description

Routing table entry.

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

Member Function Documentation

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

Delete precursor.

idprecursor address
true on success

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

References m_precursorList, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

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

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 129 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().

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

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

idprecursor address
true on success

Definition at line 67 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().

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

Check that precursor list empty

true if precursor list empty

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

References m_precursorList.

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

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

Lookup precursor by address

idprecursor address
true on success

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

References m_precursorList, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

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

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

Compare destination address.

true if equal

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

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

Member Data Documentation

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

Ip route, include

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

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

Referenced by operator==(), and RoutingTableEntry().

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