nlsr::RoutingTable Class Reference

#include <routing-table.hpp>

+ Inheritance diagram for nlsr::RoutingTable:
+ Collaboration diagram for nlsr::RoutingTable:

Public Types

using Error = ndn::tlv::Error
 

Public Member Functions

 RoutingTable (ndn::Scheduler &scheduler, Fib &fib, Lsdb &lsdb, NamePrefixTable &namePrefixTable, ConfParameter &confParam)
 
void addNextHop (const ndn::Name &destRouter, NextHop &nh)
 Adds a next hop to a routing table entry. More...
 
void addNextHopToDryTable (const ndn::Name &destRouter, NextHop &nh)
 Adds a next hop to a routing table entry in a dry run scenario. More...
 
void calculate ()
 Calculates a list of next hops for each router in the network. More...
 
RoutingTableEntryfindRoutingTableEntry (const ndn::Name &destRouter)
 
const std::list< RoutingTableEntry > & getDryRoutingTableEntry () const
 
const ndn::time::seconds & getRoutingCalcInterval () const
 
const std::list< RoutingTableEntry > & getRoutingTableEntry () const
 
uint64_t getRtSize ()
 
void scheduleRoutingTableCalculation ()
 Schedules a calculation event in the event scheduler only if one isn't already scheduled. More...
 
void setRoutingCalcInterval (uint32_t interval)
 
const ndn::Block & wireEncode () const
 

Public Attributes

std::unique_ptr< AfterRoutingChangeafterRoutingChange
 

Protected Attributes

std::list< RoutingTableEntrym_dryTable
 
std::list< RoutingTableEntrym_rTable
 
ndn::Block m_wire
 

Detailed Description

Definition at line 88 of file routing-table.hpp.

Member Typedef Documentation

◆ Error

Definition at line 47 of file routing-table.hpp.

Constructor & Destructor Documentation

◆ RoutingTable()

nlsr::RoutingTable::RoutingTable ( ndn::Scheduler &  scheduler,
Fib fib,
Lsdb lsdb,
NamePrefixTable namePrefixTable,
ConfParameter confParam 
)
explicit

Definition at line 38 of file routing-table.cpp.

Member Function Documentation

◆ addNextHop()

void nlsr::RoutingTable::addNextHop ( const ndn::Name &  destRouter,
NextHop nh 
)

Adds a next hop to a routing table entry.

Parameters
destRouterThe destination router whose RTE we want to modify.
nhThe next hop to add to the RTE.

Definition at line 169 of file routing-table.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNextHopToDryTable()

void nlsr::RoutingTable::addNextHopToDryTable ( const ndn::Name &  destRouter,
NextHop nh 
)

Adds a next hop to a routing table entry in a dry run scenario.

Parameters
destRouterThe destination router whose RTE we want to modify.
nhThe next hop to add to the router.

Definition at line 196 of file routing-table.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate()

void nlsr::RoutingTable::calculate ( )

Calculates a list of next hops for each router in the network.

Calculates the list of next hops to every other router in the network.

Definition at line 53 of file routing-table.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findRoutingTableEntry()

RoutingTableEntry * nlsr::RoutingTable::findRoutingTableEntry ( const ndn::Name &  destRouter)

Definition at line 185 of file routing-table.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDryRoutingTableEntry()

const std::list<RoutingTableEntry>& nlsr::RoutingTableStatus::getDryRoutingTableEntry ( ) const
inlineinherited

Definition at line 63 of file routing-table.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRoutingCalcInterval()

const ndn::time::seconds& nlsr::RoutingTable::getRoutingCalcInterval ( ) const
inline

Definition at line 132 of file routing-table.hpp.

◆ getRoutingTableEntry()

const std::list<RoutingTableEntry>& nlsr::RoutingTableStatus::getRoutingTableEntry ( ) const
inlineinherited

Definition at line 57 of file routing-table.hpp.

+ Here is the caller graph for this function:

◆ getRtSize()

uint64_t nlsr::RoutingTable::getRtSize ( )
inline

Definition at line 138 of file routing-table.hpp.

◆ scheduleRoutingTableCalculation()

void nlsr::RoutingTable::scheduleRoutingTableCalculation ( )

Schedules a calculation event in the event scheduler only if one isn't already scheduled.

Definition at line 153 of file routing-table.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRoutingCalcInterval()

void nlsr::RoutingTable::setRoutingCalcInterval ( uint32_t  interval)
inline

Definition at line 126 of file routing-table.hpp.

◆ wireEncode()

const ndn::Block & nlsr::RoutingTableStatus::wireEncode ( ) const
inherited

Definition at line 251 of file routing-table.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ afterRoutingChange

std::unique_ptr<AfterRoutingChange> nlsr::RoutingTable::afterRoutingChange

Definition at line 159 of file routing-table.hpp.

◆ m_dryTable

std::list<RoutingTableEntry> nlsr::RoutingTableStatus::m_dryTable
protectedinherited

Definition at line 80 of file routing-table.hpp.

◆ m_rTable

std::list<RoutingTableEntry> nlsr::RoutingTableStatus::m_rTable
protectedinherited

Definition at line 81 of file routing-table.hpp.

◆ m_wire

ndn::Block nlsr::RoutingTableStatus::m_wire
mutableprotectedinherited

Definition at line 82 of file routing-table.hpp.