22 #ifndef NLSR_ROUTING_TABLE_HPP 23 #define NLSR_ROUTING_TABLE_HPP 34 #include <boost/cstdint.hpp> 35 #include <ndn-cxx/util/scheduler.hpp> 87 m_routingCalcInterval = ndn::time::seconds(interval);
90 const ndn::time::seconds&
93 return m_routingCalcInterval;
96 const std::list<RoutingTableEntry>&
102 const std::list<RoutingTableEntry>&
111 return m_rTable.size();
117 calculateLsRoutingTable();
121 calculateHypRoutingTable(
bool isDryRun);
127 clearDryRoutingTable();
136 std::list<RoutingTableEntry> m_rTable;
139 ndn::Scheduler& m_scheduler;
144 const int m_NO_NEXT_HOP;
146 std::list<RoutingTableEntry> m_dryTable;
148 ndn::time::seconds m_routingCalcInterval;
150 bool m_isRoutingTableCalculating;
151 bool m_isRouteCalculationScheduled;
158 #endif // NLSR_ROUTING_TABLE_HPP void calculate()
Calculates a list of next hops for each router in the network.
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.
const std::list< RoutingTableEntry > & getDryRoutingTableEntry() const
void setRoutingCalcInterval(uint32_t interval)
Copyright (c) 2014-2018, 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
void addNextHop(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry.
const ndn::time::seconds & getRoutingCalcInterval() const
const std::list< RoutingTableEntry > & getRoutingTableEntry() const