22 #ifndef NLSR_ROUTING_TABLE_HPP 23 #define NLSR_ROUTING_TABLE_HPP 34 #include <boost/cstdint.hpp> 35 #include <ndn-cxx/util/scheduler.hpp> 81 m_routingCalcInterval = ndn::time::seconds(interval);
84 const ndn::time::seconds&
87 return m_routingCalcInterval;
90 const std::list<RoutingTableEntry>&
96 const std::list<RoutingTableEntry>&
105 return m_rTable.size();
111 calculateLsRoutingTable();
115 calculateHypRoutingTable(
bool isDryRun);
121 clearDryRoutingTable();
130 std::list<RoutingTableEntry> m_rTable;
133 ndn::Scheduler& m_scheduler;
138 std::list<RoutingTableEntry> m_dryTable;
140 ndn::time::seconds m_routingCalcInterval;
142 bool m_isRoutingTableCalculating;
143 bool m_isRouteCalculationScheduled;
150 #endif // NLSR_ROUTING_TABLE_HPP void calculate()
Calculates a list of next hops for each router in the network.
const std::list< RoutingTableEntry > & getDryRoutingTableEntry() const
const std::list< RoutingTableEntry > & getRoutingTableEntry() const
A class to house all the configuration parameters for NLSR.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
void scheduleRoutingTableCalculation()
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
RoutingTable(ndn::Scheduler &scheduler, Fib &fib, Lsdb &lsdb, NamePrefixTable &namePrefixTable, ConfParameter &confParam)
Maps names to lists of next hops, and exports this information to NFD.
void setRoutingCalcInterval(uint32_t interval)
Copyright (c) 2014-2019, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void addNextHopToDryTable(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry in a dry run scenario.
RoutingTableEntry * findRoutingTableEntry(const ndn::Name &destRouter)
std::unique_ptr< AfterRoutingChange > afterRoutingChange
const ndn::time::seconds & getRoutingCalcInterval() const
void addNextHop(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry.