26 #ifndef NFD_DAEMON_MGMT_RIB_MANAGER_HPP 27 #define NFD_DAEMON_MGMT_RIB_MANAGER_HPP 32 #include <ndn-cxx/mgmt/nfd/controller.hpp> 33 #include <ndn-cxx/mgmt/nfd/face-event-notification.hpp> 34 #include <ndn-cxx/mgmt/nfd/face-monitor.hpp> 35 #include <ndn-cxx/security/validator-config.hpp> 36 #include <ndn-cxx/util/scheduler.hpp> 53 ndn::nfd::Controller& nfdController, Dispatcher& dispatcher);
59 applyLocalhostConfig(
const ConfigSection& section,
const std::string& filename);
66 enableLocalhop(
const ConfigSection& section,
const std::string& filename);
116 slAnnounce(
const ndn::PrefixAnnouncement& pa, uint64_t faceId, time::milliseconds maxLifetime,
138 slRenew(
const Name& name, uint64_t faceId, time::milliseconds maxLifetime,
156 enum class RibUpdateResult
164 getSlAnnounceResultFromRibUpdateResult(RibUpdateResult r);
173 beginAddRoute(
const Name& name,
rib::Route route, optional<time::nanoseconds> expires,
174 const std::function<
void(RibUpdateResult)>& done);
182 beginRemoveRoute(
const Name& name,
const rib::Route& route,
183 const std::function<
void(RibUpdateResult)>& done);
187 const std::function<
void(RibUpdateResult)>& done);
191 registerTopPrefix(
const Name& topPrefix);
196 registerEntry(
const Name& topPrefix,
const Interest& interest,
197 ControlParameters parameters,
198 const ndn::mgmt::CommandContinuation& done);
203 unregisterEntry(
const Name& topPrefix,
const Interest& interest,
204 ControlParameters parameters,
205 const ndn::mgmt::CommandContinuation& done);
210 listEntries(
const Name& topPrefix,
const Interest& interest,
211 ndn::mgmt::StatusDatasetContext& context);
214 setFaceForSelfRegistration(
const Interest& request, ControlParameters& parameters);
216 ndn::mgmt::Authorization
217 makeAuthorization(
const std::string& verb)
override;
224 onFetchActiveFacesFailure(uint32_t code,
const std::string& reason);
227 onFaceDestroyedEvent(uint64_t faceId);
231 scheduleActiveFaceFetch(
const time::seconds& timeToWait);
234 removeInvalidFaces(
const std::vector<ndn::nfd::FaceStatus>& activeFaces);
237 onNotification(
const ndn::nfd::FaceEventNotification& notification);
244 ndn::KeyChain& m_keyChain;
245 ndn::nfd::Controller& m_nfdController;
246 Dispatcher& m_dispatcher;
248 ndn::nfd::FaceMonitor m_faceMonitor;
249 ndn::ValidatorConfig m_localhostValidator;
250 ndn::ValidatorConfig m_localhopValidator;
251 bool m_isLocalhopEnabled;
253 scheduler::ScopedEventId m_activeFaceFetchEvent;
254 using FaceIdSet = std::set<uint64_t>;
255 FaceIdSet m_registeredFaces;
263 #endif // NFD_DAEMON_MGMT_RIB_MANAGER_HPP represents the Routing Information Base
std::function< void(SlAnnounceResult res)> SlAnnounceCallback
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
Implements the RIB Management of NFD Management Protocol.
std::function< void(optional< ndn::PrefixAnnouncement >)> SlFindAnnCallback
A collection of common functions shared by all NFD managers, such as communicating with the dispatche...
boost::property_tree::ptree ConfigSection
a config file section
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
represents a route for a name prefix
static const Name LOCALHOP_TOP_PREFIX
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE