22 #ifndef NLSR_ROUTE_FIB_HPP
23 #define NLSR_ROUTE_FIB_HPP
28 #include <ndn-cxx/mgmt/nfd/controller.hpp>
29 #include <ndn-cxx/util/scheduler.hpp>
30 #include <ndn-cxx/util/time.hpp>
62 Fib(ndn::Face& face, ndn::Scheduler& scheduler,
AdjacencyList& adjacencyList,
74 remove(
const ndn::Name& name);
104 m_refreshTime = fert;
129 const ndn::FaceUri& faceUri,
131 const ndn::time::milliseconds& timeout,
136 setStrategy(
const ndn::Name& name,
const std::string& strategy, uint32_t count);
147 isNotNeighbor(
const ndn::Name& name);
159 getNumberOfFacesForName(
const NexthopList& nextHopList);
165 unregisterPrefix(
const ndn::Name& namePrefix,
const std::string& faceUri);
170 onRegistrationSuccess(
const ndn::nfd::ControlParameters& param,
171 const ndn::FaceUri& faceUri);
176 onRegistrationFailure(
const ndn::nfd::ControlResponse& response,
177 const ndn::nfd::ControlParameters& parameters,
178 const ndn::FaceUri& faceUri,
184 onSetStrategySuccess(
const ndn::nfd::ControlParameters& commandSuccessResult);
189 onSetStrategyFailure(
const ndn::nfd::ControlResponse& response,
190 const ndn::nfd::ControlParameters& parameters,
224 ndn::Scheduler& m_scheduler;
225 int32_t m_refreshTime;
226 ndn::nfd::Controller m_controller;
229 std::map<ndn::Name, FibEntry> m_table;
239 static constexpr uint64_t GRACE_PERIOD = 10;
A class to house all the configuration parameters for NLSR.
Maps names to lists of next hops, and exports this information to NFD.
static const std::string MULTICAST_STRATEGY
void clean()
Remove all entries from the FIB.
void remove(const ndn::Name &name)
Completely remove a name prefix from the FIB.
void update(const ndn::Name &name, const NexthopList &allHops)
Set the nexthop list of a name.
Fib(ndn::Face &face, ndn::Scheduler &scheduler, AdjacencyList &adjacencyList, ConfParameter &conf, ndn::security::KeyChain &keyChain)
static const std::string BEST_ROUTE_V2_STRATEGY
void setStrategy(const ndn::Name &name, const std::string &strategy, uint32_t count)
void setEntryRefreshTime(int32_t fert)
ndn::util::Signal< Fib, const ndn::Name & > onPrefixRegistrationSuccess
void registerPrefix(const ndn::Name &namePrefix, const ndn::FaceUri &faceUri, uint64_t faceCost, const ndn::time::milliseconds &timeout, uint64_t flags, uint8_t times)
Inform NFD of a next-hop.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California,...
std::function< void(FibEntry &)> afterRefreshCallback
ndn::scheduler::ScopedEventId refreshEventId
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE