21 #ifndef NLSR_ROUTING_TABLE_HPP
22 #define NLSR_ROUTING_TABLE_HPP
32 #include <ndn-cxx/util/scheduler.hpp>
57 const std::list<RoutingTableEntry>&
63 const std::list<RoutingTableEntry>&
74 wireDecode(
const ndn::Block& wire);
76 template<ndn::encoding::Tag TAG>
78 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
97 m_afterLsdbModified.disconnect();
133 calculateLsRoutingTable();
137 calculateHypRoutingTable(
bool isDryRun);
143 clearDryRoutingTable();
149 ndn::Scheduler& m_scheduler;
153 ndn::time::seconds m_routingCalcInterval;
154 bool m_isRoutingTableCalculating;
155 bool m_isRouteCalculationScheduled;
158 ndn::signal::Connection m_afterLsdbModified;
159 int32_t m_hyperbolicState;
160 bool m_ownAdjLsaExist =
false;
A class to house all the configuration parameters for NLSR.
Data abstraction for Nexthop.
Data abstraction for RouteTableInfo.
void calculate()
Calculates a list of next hops for each router in the network.
void scheduleRoutingTableCalculation()
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
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 addNextHop(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry.
RoutingTable(ndn::Scheduler &scheduler, Lsdb &lsdb, ConfParameter &confParam)
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)
ndn::signal::Signal< RoutingTable, std::list< RoutingTableEntry > > AfterRoutingChange
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE