21 #ifndef NLSR_ROUTING_TABLE_HPP
22 #define NLSR_ROUTING_TABLE_HPP
31 #include <ndn-cxx/util/scheduler.hpp>
56 const std::list<RoutingTableEntry>&
62 const std::list<RoutingTableEntry>&
73 wireDecode(
const ndn::Block& wire);
75 template<ndn::encoding::Tag TAG>
77 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
128 m_routingCalcInterval = ndn::time::seconds(interval);
131 const ndn::time::seconds&
134 return m_routingCalcInterval;
146 calculateLsRoutingTable();
150 calculateHypRoutingTable(
bool isDryRun);
156 clearDryRoutingTable();
162 ndn::Scheduler& m_scheduler;
167 ndn::time::seconds m_routingCalcInterval;
170 bool m_isRoutingTableCalculating;
171 bool m_isRouteCalculationScheduled;
A class to house all the configuration parameters for NLSR.
Maps names to lists of next hops, and exports this information to NFD.
Data abstraction for Nexthop.
Data abstraction for RouteTableInfo.
RoutingTable(ndn::Scheduler &scheduler, Fib &fib, Lsdb &lsdb, NamePrefixTable &namePrefixTable, ConfParameter &confParam)
void calculate()
Calculates a list of next hops for each router in the network.
const ndn::time::seconds & getRoutingCalcInterval() const
void scheduleRoutingTableCalculation()
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
std::unique_ptr< AfterRoutingChange > afterRoutingChange
void addNextHopToDryTable(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry in a dry run scenario.
void setRoutingCalcInterval(uint32_t interval)
void addNextHop(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry.
RoutingTableEntry * findRoutingTableEntry(const ndn::Name &destRouter)
Data abstraction for routing table status.
const std::list< RoutingTableEntry > & getDryRoutingTableEntry() const
RoutingTableStatus()=default
std::list< RoutingTableEntry > m_dryTable
std::list< RoutingTableEntry > m_rTable
const ndn::Block & wireEncode() const
RoutingTableStatus(const ndn::Block &block)
const std::list< RoutingTableEntry > & getRoutingTableEntry() const
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California,...
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE