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);
78 applyPaConfig(
const ConfigSection& section,
const std::string& filename);
122 slAnnounce(
const ndn::PrefixAnnouncement& pa, uint64_t faceId, time::milliseconds maxLifetime,
144 slRenew(
const Name& name, uint64_t faceId, time::milliseconds maxLifetime,
162 enum class RibUpdateResult
170 getSlAnnounceResultFromRibUpdateResult(RibUpdateResult r);
179 beginAddRoute(
const Name& name,
rib::Route route, optional<time::nanoseconds> expires,
180 const std::function<
void(RibUpdateResult)>& done);
188 beginRemoveRoute(
const Name& name,
const rib::Route& route,
189 const std::function<
void(RibUpdateResult)>& done);
193 const std::function<
void(RibUpdateResult)>& done);
197 registerTopPrefix(
const Name& topPrefix);
202 registerEntry(
const Name& topPrefix,
const Interest& interest,
203 ControlParameters parameters,
204 const ndn::mgmt::CommandContinuation& done);
209 unregisterEntry(
const Name& topPrefix,
const Interest& interest,
210 ControlParameters parameters,
211 const ndn::mgmt::CommandContinuation& done);
216 listEntries(
const Name& topPrefix,
const Interest& interest,
217 ndn::mgmt::StatusDatasetContext& context);
220 setFaceForSelfRegistration(
const Interest& request, ControlParameters& parameters);
222 ndn::mgmt::Authorization
223 makeAuthorization(
const std::string& verb)
override;
230 onFetchActiveFacesFailure(uint32_t code,
const std::string& reason);
234 scheduleActiveFaceFetch(
const time::seconds& timeToWait);
237 removeInvalidFaces(
const std::vector<ndn::nfd::FaceStatus>& activeFaces);
240 onNotification(
const ndn::nfd::FaceEventNotification& notification);
247 ndn::KeyChain& m_keyChain;
248 ndn::nfd::Controller& m_nfdController;
249 Dispatcher& m_dispatcher;
251 ndn::nfd::FaceMonitor m_faceMonitor;
252 ndn::ValidatorConfig m_localhostValidator;
253 ndn::ValidatorConfig m_localhopValidator;
254 ndn::ValidatorConfig m_paValidator;
255 bool m_isLocalhopEnabled;
257 scheduler::ScopedEventId m_activeFaceFetchEvent;
265 #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