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

The Routing table used by AODV protocol. More...

#include <aodv-rtable.h>

Public Member Functions

 RoutingTable (Time t)
 c-tor
 
bool AddRoute (RoutingTableEntry &r)
 
void Clear ()
 Delete all entries from routing table.
 
void DeleteAllRoutesFromInterface (Ipv4InterfaceAddress iface)
 Delete all route from interface with address iface.
 
bool DeleteRoute (Ipv4Address dst)
 
void GetListOfDestinationWithNextHop (Ipv4Address nextHop, std::map< Ipv4Address, uint32_t > &unreachable)
 Lookup routing entries with next hop Address dst and not empty list of precursors.
 
void InvalidateRoutesWithDst (std::map< Ipv4Address, uint32_t > const &unreachable)
 
bool LookupRoute (Ipv4Address dst, RoutingTableEntry &rt)
 
bool LookupValidRoute (Ipv4Address dst, RoutingTableEntry &rt)
 Lookup route in VALID state.
 
bool MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTimeout)
 
void Print (Ptr< OutputStreamWrapper > stream) const
 Print routing table.
 
void Purge ()
 Delete all outdated entries and invalidate valid entry if Lifetime is expired.
 
bool SetEntryState (Ipv4Address dst, RouteFlags state)
 Set routing table entry flags.
 
bool Update (RoutingTableEntry &rt)
 Update routing table.
 
Handle life time of invalid route
Time GetBadLinkLifetime () const
 
void SetBadLinkLifetime (Time t)
 

Private Member Functions

void Purge (std::map< Ipv4Address, RoutingTableEntry > &table) const
 const version of Purge, for use by Print() method
 

Private Attributes

Time m_badLinkLifetime
 Deletion time for invalid routes.
 
std::map< Ipv4Address,
RoutingTableEntry
m_ipv4AddressEntry
 

Detailed Description

The Routing table used by AODV protocol.

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

Member Function Documentation

bool ns3::aodv::RoutingTable::DeleteRoute ( Ipv4Address  dst)

Delete routing table entry with destination address dst, if it exists.

Parameters
dstdestination address
Returns
true on success

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

References NS_LOG_FUNCTION, NS_LOG_LOGIC, and Purge().

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

void ns3::aodv::RoutingTable::InvalidateRoutesWithDst ( std::map< Ipv4Address, uint32_t > const &  unreachable)

Update routing entries with this destinations as follows:

  1. The destination sequence number of this routing entry, if it exists and is valid, is incremented.
  2. The entry is invalidated by marking the route entry as invalid
  3. The Lifetime field is updated to current time plus DELETE_PERIOD.

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

References m_badLinkLifetime, NS_LOG_FUNCTION, NS_LOG_LOGIC, Purge(), and ns3::aodv::VALID.

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

bool ns3::aodv::RoutingTable::MarkLinkAsUnidirectional ( Ipv4Address  neighbor,
Time  blacklistTimeout 
)

Mark entry as unidirectional (e.g. add this neighbor to "blacklist" for blacklistTimeout period)

Parameters
neighbor- neighbor address link to which assumed to be unidirectional
blacklistTimeout- time for which the neighboring node is put into the blacklist
Returns
true on success

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

References ns3::Time::GetSeconds(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

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


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