A Discrete-Event Network Simulator
API
ns3::RipRoutingTableEntry Class Reference

Rip Routing Table Entry. More...

#include "rip.h"

+ Inheritance diagram for ns3::RipRoutingTableEntry:
+ Collaboration diagram for ns3::RipRoutingTableEntry:

Public Types

enum  Status_e { RIP_VALID , RIP_INVALID }
 Route status. More...
 

Public Member Functions

 RipRoutingTableEntry (Ipv4Address network, Ipv4Mask networkPrefix, Ipv4Address nextHop, uint32_t interface)
 Constructor. More...
 
 RipRoutingTableEntry (Ipv4Address network, Ipv4Mask networkPrefix, uint32_t interface)
 Constructor. More...
 
 RipRoutingTableEntry (void)
 
virtual ~RipRoutingTableEntry ()
 
uint8_t GetRouteMetric (void) const
 Get the route metric. More...
 
Status_e GetRouteStatus (void) const
 Get the route status. More...
 
uint16_t GetRouteTag (void) const
 Get the route tag. More...
 
bool IsRouteChanged (void) const
 Get the route changed status. More...
 
void SetRouteChanged (bool changed)
 Set the route as changed. More...
 
void SetRouteMetric (uint8_t routeMetric)
 Set the route metric. More...
 
void SetRouteStatus (Status_e status)
 Set the route status. More...
 
void SetRouteTag (uint16_t routeTag)
 Set the route tag. More...
 
- Public Member Functions inherited from ns3::Ipv4RoutingTableEntry
 Ipv4RoutingTableEntry ()
 This constructor does nothing. More...
 
 Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const &route)
 Copy Constructor. More...
 
 Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const *route)
 Copy Constructor. More...
 
Ipv4Address GetDest (void) const
 
Ipv4Address GetDestNetwork (void) const
 
Ipv4Mask GetDestNetworkMask (void) const
 
Ipv4Address GetGateway (void) const
 
uint32_t GetInterface (void) const
 
bool IsDefault (void) const
 
bool IsGateway (void) const
 
bool IsHost (void) const
 
bool IsNetwork (void) const
 

Private Attributes

bool m_changed
 route has been updated More...
 
uint8_t m_metric
 route metric More...
 
Status_e m_status
 route status More...
 
uint16_t m_tag
 route tag More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::Ipv4RoutingTableEntry
static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, uint32_t interface)
 
static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, Ipv4Address nextHop, uint32_t interface)
 
static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, uint32_t interface)
 
static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface)
 
static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, uint32_t interface)
 

Detailed Description

Rip Routing Table Entry.

Definition at line 63 of file rip.h.

Member Enumeration Documentation

◆ Status_e

Route status.

Enumerator
RIP_VALID 
RIP_INVALID 

Definition at line 70 of file rip.h.

Constructor & Destructor Documentation

◆ RipRoutingTableEntry() [1/3]

ns3::RipRoutingTableEntry::RipRoutingTableEntry ( void  )

Definition at line 1306 of file rip.cc.

◆ RipRoutingTableEntry() [2/3]

ns3::RipRoutingTableEntry::RipRoutingTableEntry ( Ipv4Address  network,
Ipv4Mask  networkPrefix,
Ipv4Address  nextHop,
uint32_t  interface 
)

Constructor.

Parameters
networknetwork address
networkPrefixnetwork prefix
nextHopnext hop address to route the packet
interfaceinterface index

Definition at line 1311 of file rip.cc.

◆ RipRoutingTableEntry() [3/3]

ns3::RipRoutingTableEntry::RipRoutingTableEntry ( Ipv4Address  network,
Ipv4Mask  networkPrefix,
uint32_t  interface 
)

Constructor.

Parameters
networknetwork address
networkPrefixnetwork prefix
interfaceinterface index

Definition at line 1317 of file rip.cc.

◆ ~RipRoutingTableEntry()

ns3::RipRoutingTableEntry::~RipRoutingTableEntry ( )
virtual

Definition at line 1323 of file rip.cc.

Member Function Documentation

◆ GetRouteMetric()

uint8_t ns3::RipRoutingTableEntry::GetRouteMetric ( void  ) const

Get the route metric.

Returns
the route metric

Definition at line 1351 of file rip.cc.

References m_metric.

Referenced by ns3::operator<<(), and ns3::Rip::PrintRoutingTable().

+ Here is the caller graph for this function:

◆ GetRouteStatus()

RipRoutingTableEntry::Status_e ns3::RipRoutingTableEntry::GetRouteStatus ( void  ) const

Get the route status.

Returns
the route status

Definition at line 1365 of file rip.cc.

References m_status.

Referenced by ns3::Rip::Lookup(), and ns3::Rip::PrintRoutingTable().

+ Here is the caller graph for this function:

◆ GetRouteTag()

uint16_t ns3::RipRoutingTableEntry::GetRouteTag ( void  ) const

Get the route tag.

Returns
the route tag

Definition at line 1337 of file rip.cc.

References m_tag.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

◆ IsRouteChanged()

bool ns3::RipRoutingTableEntry::IsRouteChanged ( void  ) const

Get the route changed status.

Returns
true if route is changed

Definition at line 1375 of file rip.cc.

References m_changed.

◆ SetRouteChanged()

void ns3::RipRoutingTableEntry::SetRouteChanged ( bool  changed)

Set the route as changed.

The changed routes are scheduled for a Triggered Update. After a Triggered Update, all the changed flags are cleared from the routing table.

Parameters
changedtrue if route is changed

Definition at line 1370 of file rip.cc.

References m_changed.

Referenced by ns3::Rip::AddNetworkRouteTo(), ns3::Rip::HandleResponses(), and ns3::Rip::InvalidateRoute().

+ Here is the caller graph for this function:

◆ SetRouteMetric()

void ns3::RipRoutingTableEntry::SetRouteMetric ( uint8_t  routeMetric)

Set the route metric.

Parameters
routeMetricthe route metric

Definition at line 1342 of file rip.cc.

References m_changed, and m_metric.

Referenced by ns3::Rip::AddNetworkRouteTo(), ns3::Rip::HandleResponses(), and ns3::Rip::InvalidateRoute().

+ Here is the caller graph for this function:

◆ SetRouteStatus()

void ns3::RipRoutingTableEntry::SetRouteStatus ( Status_e  status)

Set the route status.

Parameters
statusthe route status

Definition at line 1356 of file rip.cc.

References m_changed, and m_status.

Referenced by ns3::Rip::AddNetworkRouteTo(), ns3::Rip::HandleResponses(), and ns3::Rip::InvalidateRoute().

+ Here is the caller graph for this function:

◆ SetRouteTag()

void ns3::RipRoutingTableEntry::SetRouteTag ( uint16_t  routeTag)

Set the route tag.

Parameters
routeTagthe route tag

Definition at line 1328 of file rip.cc.

References m_changed, and m_tag.

Referenced by ns3::Rip::HandleResponses().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_changed

bool ns3::RipRoutingTableEntry::m_changed
private

route has been updated

Definition at line 154 of file rip.h.

Referenced by IsRouteChanged(), SetRouteChanged(), SetRouteMetric(), SetRouteStatus(), and SetRouteTag().

◆ m_metric

uint8_t ns3::RipRoutingTableEntry::m_metric
private

route metric

Definition at line 152 of file rip.h.

Referenced by GetRouteMetric(), and SetRouteMetric().

◆ m_status

Status_e ns3::RipRoutingTableEntry::m_status
private

route status

Definition at line 153 of file rip.h.

Referenced by GetRouteStatus(), and SetRouteStatus().

◆ m_tag

uint16_t ns3::RipRoutingTableEntry::m_tag
private

route tag

Definition at line 151 of file rip.h.

Referenced by GetRouteTag(), and SetRouteTag().


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