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/time.hpp> 55 Fib(ndn::Face& face, ndn::Scheduler& scheduler,
AdjacencyList& adjacencyList,
67 remove(
const ndn::Name& name);
100 m_refreshTime = fert;
125 const ndn::FaceUri& faceUri,
127 const ndn::time::milliseconds& timeout,
132 setStrategy(
const ndn::Name& name,
const std::string& strategy, uint32_t count);
143 isNotNeighbor(
const ndn::Name& name);
155 getNumberOfFacesForName(
const NexthopList& nextHopList);
161 unregisterPrefix(
const ndn::Name& namePrefix,
const std::string& faceUri);
166 onRegistrationSuccess(
const ndn::nfd::ControlParameters& param,
167 const ndn::FaceUri& faceUri);
172 onRegistrationFailure(
const ndn::nfd::ControlResponse& response,
173 const ndn::nfd::ControlParameters& parameters,
174 const ndn::FaceUri& faceUri,
180 onSetStrategySuccess(
const ndn::nfd::ControlParameters& commandSuccessResult);
185 onSetStrategyFailure(
const ndn::nfd::ControlResponse& response,
186 const ndn::nfd::ControlParameters& parameters,
201 scheduleEntryRefresh(
FibEntry& entry,
const afterRefreshCallback& refreshCb);
219 cancelEntryRefresh(
const FibEntry& entry);
224 refreshEntry(
const ndn::Name& name, afterRefreshCallback refreshCb);
232 ndn::Scheduler& m_scheduler;
233 int32_t m_refreshTime;
234 ndn::nfd::Controller m_controller;
237 std::map<ndn::Name, FibEntry> m_table;
247 static const uint64_t GRACE_PERIOD;
252 #endif // NLSR_ROUTE_FIB_HPP
A class to house all the configuration parameters for NLSR.
void update(const ndn::Name &name, const NexthopList &allHops)
Set the nexthop list of a name.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
static const std::string MULTICAST_STRATEGY
void setStrategy(const ndn::Name &name, const std::string &strategy, uint32_t count)
static const std::string BEST_ROUTE_V2_STRATEGY
Maps names to lists of next hops, and exports this information to NFD.
void setEntryRefreshTime(int32_t fert)
void clean()
Remove all entries from the FIB.
Fib(ndn::Face &face, ndn::Scheduler &scheduler, AdjacencyList &adjacencyList, ConfParameter &conf, ndn::security::v2::KeyChain &keyChain)
Copyright (c) 2014-2019, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
ndn::util::Signal< Fib, const ndn::Name & > onPrefixRegistrationSuccess
std::function< void(FibEntry &)> afterRefreshCallback
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.