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, Lsdb &lsdb, ConfParameter &confParam)
 
 ~RoutingTable ()
 
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 std::list< RoutingTableEntry > & getRoutingTableEntry () const
 
void scheduleRoutingTableCalculation ()
 Schedules a calculation event in the event scheduler only if one isn't already scheduled. More...
 
const ndn::Block & wireEncode () const
 

Public Attributes

AfterRoutingChange afterRoutingChange
 

Protected Attributes

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

Detailed Description

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

Member Typedef Documentation

◆ Error

using nlsr::RoutingTableStatus::Error = ndn::tlv::Error
inherited

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

Constructor & Destructor Documentation

◆ RoutingTable()

nlsr::RoutingTable::RoutingTable ( ndn::Scheduler &  scheduler,
Lsdb lsdb,
ConfParameter confParam 
)
explicit

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

◆ ~RoutingTable()

nlsr::RoutingTable::~RoutingTable ( )
inline

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

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 183 of file routing-table.cpp.

◆ 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 211 of file routing-table.cpp.

◆ 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 86 of file routing-table.cpp.

◆ findRoutingTableEntry()

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

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

◆ getDryRoutingTableEntry()

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

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

◆ getRoutingTableEntry()

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

Definition at line 58 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 167 of file routing-table.cpp.

◆ wireEncode()

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

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

Member Data Documentation

◆ afterRoutingChange

AfterRoutingChange nlsr::RoutingTable::afterRoutingChange

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

◆ m_dryTable

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

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

◆ m_rTable

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

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

◆ m_wire

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

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