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

Routing table entry. More...

#include <dsdv-rtable.h>

+ Collaboration diagram for ns3::dsdv::RoutingTableEntry:

Public Member Functions

 RoutingTableEntry (Ptr< NetDevice > dev=0, Ipv4Address dst=Ipv4Address(), uint32_t m_seqNo=0, Ipv4InterfaceAddress iface=Ipv4InterfaceAddress(), uint32_t hops=0, Ipv4Address nextHop=Ipv4Address(), Time lifetime=Simulator::Now(), Time SettlingTime=Simulator::Now(), bool changedEntries=false)
 c-tor More...
 
 ~RoutingTableEntry ()
 
Ipv4Address GetDestination () const
 
bool GetEntriesChanged () const
 
RouteFlags GetFlag () const
 
uint32_t GetHop () const
 
Ipv4InterfaceAddress GetInterface () const
 
Time GetLifeTime () const
 
Ipv4Address GetNextHop () const
 
Ptr< NetDeviceGetOutputDevice () const
 
Ptr< Ipv4RouteGetRoute () const
 
uint32_t GetSeqNo () const
 
Time GetSettlingTime () const
 
bool operator== (Ipv4Address const destination) const
 Compare destination address. More...
 
void Print (Ptr< OutputStreamWrapper > stream) const
 
void SetEntriesChanged (bool entriesChanged)
 
void SetFlag (RouteFlags flag)
 
void SetHop (uint32_t hopCount)
 
void SetInterface (Ipv4InterfaceAddress iface)
 
void SetLifeTime (Time lifeTime)
 
void SetNextHop (Ipv4Address nextHop)
 
void SetOutputDevice (Ptr< NetDevice > device)
 
void SetRoute (Ptr< Ipv4Route > route)
 
void SetSeqNo (uint32_t sequenceNumber)
 
void SetSettlingTime (Time settlingTime)
 

Private Attributes

Fields
uint32_t m_seqNo
 Destination Sequence Number. More...
 
uint32_t m_hops
 Hop Count (number of hops needed to reach destination) 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...
 
Ptr< Ipv4Routem_ipv4Route
 Ip route, include. More...
 
Ipv4InterfaceAddress m_iface
 Output interface address. More...
 
RouteFlags m_flag
 Routing flags: valid, invalid or in search. More...
 
Time m_settlingTime
 Time for which the node retains an update with changed metric before broadcasting it. More...
 
uint32_t m_entriesChanged
 Flag to show if any of the routing table entries were changed with the routing update. More...
 

Detailed Description

Routing table entry.

Definition at line 56 of file dsdv-rtable.h.

Constructor & Destructor Documentation

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

Definition at line 63 of file dsdv-rtable.cc.

Member Function Documentation

Ipv4Address ns3::dsdv::RoutingTableEntry::GetDestination ( ) const
inline
bool ns3::dsdv::RoutingTableEntry::GetEntriesChanged ( ) const
inline

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

References m_entriesChanged.

Referenced by ns3::dsdv::RoutingProtocol::MergeTriggerPeriodicUpdates().

+ Here is the caller graph for this function:

RouteFlags ns3::dsdv::RoutingTableEntry::GetFlag ( ) const
inline

Definition at line 156 of file dsdv-rtable.h.

References m_flag.

uint32_t ns3::dsdv::RoutingTableEntry::GetHop ( ) const
inline

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

References m_hops.

Referenced by ns3::DsdvTableTestCase::DoRun(), ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), and ns3::dsdv::RoutingProtocol::SendTriggeredUpdate().

+ Here is the caller graph for this function:

Ipv4InterfaceAddress ns3::dsdv::RoutingTableEntry::GetInterface ( ) const
inline

Definition at line 101 of file dsdv-rtable.h.

References m_iface.

Referenced by ns3::DsdvTableTestCase::DoRun().

+ Here is the caller graph for this function:

Time ns3::dsdv::RoutingTableEntry::GetLifeTime ( ) const
inline

Definition at line 136 of file dsdv-rtable.h.

References m_lifeTime, and ns3::Simulator::Now().

Referenced by ns3::dsdv::RoutingProtocol::GetSettlingTime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv4Address ns3::dsdv::RoutingTableEntry::GetNextHop ( ) const
inline

Definition at line 86 of file dsdv-rtable.h.

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

Referenced by ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), and ns3::dsdv::RoutingProtocol::RouteInput().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr<NetDevice> ns3::dsdv::RoutingTableEntry::GetOutputDevice ( ) const
inline

Definition at line 96 of file dsdv-rtable.h.

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

+ Here is the call graph for this function:

Ptr<Ipv4Route> ns3::dsdv::RoutingTableEntry::GetRoute ( ) const
inline

Definition at line 71 of file dsdv-rtable.h.

References m_ipv4Route.

Referenced by ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), ns3::dsdv::RoutingProtocol::RouteInput(), and ns3::dsdv::RoutingProtocol::RouteOutput().

+ Here is the caller graph for this function:

uint32_t ns3::dsdv::RoutingTableEntry::GetSeqNo ( ) const
inline

Definition at line 116 of file dsdv-rtable.h.

References m_seqNo.

Referenced by ns3::DsdvTableTestCase::DoRun(), ns3::dsdv::RoutingProtocol::MergeTriggerPeriodicUpdates(), and ns3::dsdv::RoutingProtocol::SendTriggeredUpdate().

+ Here is the caller graph for this function:

Time ns3::dsdv::RoutingTableEntry::GetSettlingTime ( ) const
inline

Definition at line 146 of file dsdv-rtable.h.

References m_settlingTime.

Referenced by ns3::dsdv::RoutingProtocol::GetSettlingTime().

+ Here is the caller graph for this function:

bool ns3::dsdv::RoutingTableEntry::operator== ( Ipv4Address const  destination) const
inline

Compare destination address.

Returns
true if equal

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

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

+ Here is the call graph for this function:

void ns3::dsdv::RoutingTableEntry::SetEntriesChanged ( bool  entriesChanged)
inline

Definition at line 161 of file dsdv-rtable.h.

References m_entriesChanged.

Referenced by ns3::dsdv::RoutingProtocol::MergeTriggerPeriodicUpdates(), and ns3::dsdv::RoutingProtocol::SetIpv4().

+ Here is the caller graph for this function:

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

Definition at line 151 of file dsdv-rtable.h.

References m_flag.

Referenced by ns3::dsdv::RoutingProtocol::MergeTriggerPeriodicUpdates(), ns3::dsdv::RoutingProtocol::RecvDsdv(), and ns3::dsdv::RoutingProtocol::SetIpv4().

+ Here is the caller graph for this function:

void ns3::dsdv::RoutingTableEntry::SetHop ( uint32_t  hopCount)
inline

Definition at line 121 of file dsdv-rtable.h.

References m_hops.

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

Definition at line 106 of file dsdv-rtable.h.

References m_iface.

void ns3::dsdv::RoutingTableEntry::SetLifeTime ( Time  lifeTime)
inline

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

References m_lifeTime.

void ns3::dsdv::RoutingTableEntry::SetNextHop ( Ipv4Address  nextHop)
inline

Definition at line 81 of file dsdv-rtable.h.

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

+ Here is the call graph for this function:

void ns3::dsdv::RoutingTableEntry::SetOutputDevice ( Ptr< NetDevice device)
inline

Definition at line 91 of file dsdv-rtable.h.

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

+ Here is the call graph for this function:

void ns3::dsdv::RoutingTableEntry::SetRoute ( Ptr< Ipv4Route route)
inline

Definition at line 76 of file dsdv-rtable.h.

References m_ipv4Route.

void ns3::dsdv::RoutingTableEntry::SetSeqNo ( uint32_t  sequenceNumber)
inline

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

References m_seqNo.

Referenced by ns3::dsdv::RoutingProtocol::SendPeriodicUpdate().

+ Here is the caller graph for this function:

void ns3::dsdv::RoutingTableEntry::SetSettlingTime ( Time  settlingTime)
inline

Definition at line 141 of file dsdv-rtable.h.

References m_settlingTime.

Member Data Documentation

uint32_t ns3::dsdv::RoutingTableEntry::m_entriesChanged
private

Flag to show if any of the routing table entries were changed with the routing update.

Definition at line 211 of file dsdv-rtable.h.

Referenced by GetEntriesChanged(), and SetEntriesChanged().

RouteFlags ns3::dsdv::RoutingTableEntry::m_flag
private

Routing flags: valid, invalid or in search.

Definition at line 206 of file dsdv-rtable.h.

Referenced by GetFlag(), and SetFlag().

uint32_t ns3::dsdv::RoutingTableEntry::m_hops
private

Hop Count (number of hops needed to reach destination)

Definition at line 188 of file dsdv-rtable.h.

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

Ipv4InterfaceAddress ns3::dsdv::RoutingTableEntry::m_iface
private

Output interface address.

Definition at line 204 of file dsdv-rtable.h.

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

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

Ip route, include.

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

Definition at line 202 of file dsdv-rtable.h.

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

Time ns3::dsdv::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 195 of file dsdv-rtable.h.

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

uint32_t ns3::dsdv::RoutingTableEntry::m_seqNo
private

Destination Sequence Number.

Definition at line 186 of file dsdv-rtable.h.

Referenced by GetSeqNo(), Print(), and SetSeqNo().

Time ns3::dsdv::RoutingTableEntry::m_settlingTime
private

Time for which the node retains an update with changed metric before broadcasting it.

A node does that in hope of receiving a better update.

Definition at line 209 of file dsdv-rtable.h.

Referenced by GetSettlingTime(), Print(), and SetSettlingTime().


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