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>
65 Fib(ndn::Face& face, ndn::Scheduler& scheduler,
AdjacencyList& adjacencyList,
77 remove(
const ndn::Name& name);
121 const ndn::FaceUri& faceUri,
123 const ndn::time::milliseconds& timeout,
128 setStrategy(
const ndn::Name& name,
const ndn::Name& strategy, uint32_t count);
139 isNotNeighbor(
const ndn::Name& name);
151 getNumberOfFacesForName(
const NexthopList& nextHopList);
157 unregisterPrefix(
const ndn::Name& namePrefix,
const ndn::FaceUri& faceUri);
162 onRegistrationSuccess(
const ndn::nfd::ControlParameters& param,
163 const ndn::FaceUri& faceUri);
168 onRegistrationFailure(
const ndn::nfd::ControlResponse& response,
169 const ndn::nfd::ControlParameters& parameters,
170 const ndn::FaceUri& faceUri,
176 onSetStrategySuccess(
const ndn::nfd::ControlParameters& commandSuccessResult);
181 onSetStrategyFailure(
const ndn::nfd::ControlResponse& response,
182 const ndn::nfd::ControlParameters& parameters,
217 ndn::Scheduler& m_scheduler;
218 int32_t m_refreshTime;
219 ndn::nfd::Controller m_controller;
222 std::map<ndn::Name, FibEntry> m_table;
232 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.
void setStrategy(const ndn::Name &name, const ndn::Name &strategy, uint32_t count)
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)
void setEntryRefreshTime(int32_t fert)
static const ndn::Name MULTICAST_STRATEGY
static const ndn::Name BEST_ROUTE_STRATEGY
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.
ndn::signal::Signal< Fib, ndn::Name > onPrefixRegistrationSuccess
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::function< void(FibEntry &)> AfterRefreshCallback
ndn::scheduler::ScopedEventId refreshEventId
NextHopsUriSortedSet nexthopSet
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE