ns-3
ns3::aodv::RoutingTable Class Reference

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

#include <aodv-rtable.h>

List of all members.

Public Member Functions

 RoutingTable (Time t)
 c-tor
bool AddRoute (RoutingTableEntry &r)
bool DeleteRoute (Ipv4Address dst)
bool LookupRoute (Ipv4Address dst, RoutingTableEntry &rt)
bool LookupValidRoute (Ipv4Address dst, RoutingTableEntry &rt)
 Lookup route in VALID state.
bool Update (RoutingTableEntry &rt)
 Update routing table.
bool SetEntryState (Ipv4Address dst, RouteFlags state)
 Set routing table entry flags.
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)
void DeleteAllRoutesFromInterface (Ipv4InterfaceAddress iface)
 Delete all route from interface with address iface.
void Clear ()
 Delete all entries from routing table.
void Purge ()
 Delete all outdated entries and invalidate valid entry if Lifetime is expired.
bool MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTimeout)
void Print (Ptr< OutputStreamWrapper > stream) const
 Print routing table.
Handle life time of invalid route
Time GetBadLinkLifetime () const
void SetBadLinkLifetime (Time t)

Detailed Description

The Routing table used by AODV protocol.


Member Function Documentation

Add routing table entry if it doesn't yet exist in routing table

Parameters:
rrouting table entry
Returns:
true in success

References ns3::aodv::IN_SEARCH, NS_LOG_FUNCTION, and Purge().

Referenced by ns3::aodv::RoutingProtocol::NotifyAddAddress(), ns3::aodv::RoutingProtocol::NotifyInterfaceUp(), ns3::aodv::RoutingProtocol::NotifyRemoveAddress(), and ns3::aodv::RoutingProtocol::SetIpv4().

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

Parameters:
dstdestination address
Returns:
true on success

References NS_LOG_FUNCTION, NS_LOG_LOGIC, and Purge().

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.

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

Lookup routing table entry with destination address dst

Parameters:
dstdestination address
rtentry with destination address dst, if exists
Returns:
true on success

References NS_LOG_FUNCTION, NS_LOG_LOGIC, and Purge().

Referenced by LookupValidRoute(), and ns3::aodv::RoutingProtocol::RouteInput().

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

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


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