26 #ifndef NFD_RIB_RIB_MANAGER_HPP 27 #define NFD_RIB_RIB_MANAGER_HPP 36 #include <ndn-cxx/security/validator-config.hpp> 37 #include <ndn-cxx/mgmt/nfd/controller.hpp> 38 #include <ndn-cxx/mgmt/nfd/face-event-notification.hpp> 39 #include <ndn-cxx/mgmt/nfd/face-monitor.hpp> 40 #include <ndn-cxx/util/scheduler-scoped-event-id.hpp> 51 class Error :
public std::runtime_error
56 :
std::runtime_error(what)
83 onConfig(
const ConfigSection& configSection,
bool isDryRun,
const std::string& filename);
86 registerTopPrefix(
const Name& topPrefix);
90 registerEntry(
const Name& topPrefix,
const Interest& interest,
95 unregisterEntry(
const Name& topPrefix,
const Interest& interest,
100 listEntries(
const Name& topPrefix,
const Interest& interest,
107 makeAuthorization(
const std::string& verb)
override;
114 onFetchActiveFacesFailure(uint32_t code,
const std::string& reason);
117 onFaceDestroyedEvent(uint64_t faceId);
121 scheduleActiveFaceFetch(
const time::seconds& timeToWait);
129 removeInvalidFaces(
const std::vector<ndn::nfd::FaceStatus>& activeFaces);
147 onEnableLocalFieldsSuccess();
157 ndn::ValidatorConfig m_localhostValidator;
158 ndn::ValidatorConfig m_localhopValidator;
159 bool m_isLocalhopEnabled;
161 unique_ptr<Readvertise> m_readvertiseNlsr;
168 static const Name LOCAL_HOST_TOP_PREFIX;
169 static const Name LOCAL_HOP_TOP_PREFIX;
170 static const std::string MGMT_MODULE_NAME;
171 static const Name FACES_LIST_DATASET_PREFIX;
172 static const time::seconds ACTIVE_FACE_FETCH_INTERVAL;
174 static const Name READVERTISE_NLSR_PREFIX;
176 typedef std::set<uint64_t> FaceIdSet;
179 FaceIdSet m_registeredFaces;
181 std::function<void(const Name& topPrefix)> m_addTopPrefix;
187 #endif // NFD_RIB_RIB_MANAGER_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
Error(const std::string &what)
a collection of common functions shared by all NFD managers and RIB manager, such as communicating wi...
represents the Routing Information Base
represents parameters in a ControlCommand request or response
represents a dispatcher on server side of NFD Management protocol
configuration file parsing utility
RibManager(Dispatcher &dispatcher, ndn::Face &face, ndn::KeyChain &keyChain)
computes FibUpdates based on updates to the RIB and sends them to NFD
represents a Face status change notification
represents an Interest packet
A subscriber for Face status change notification stream.
void onRibUpdateSuccess(const RibUpdate &update)
mgmt::ControlResponse ControlResponse
Copyright (c) 2011-2015 Regents of the University of California.
Provide a communication channel with local or remote NDN forwarder.
NFD Management protocol client.
cancels an event automatically upon destruction
boost::property_tree::ptree ConfigSection
a config file section
Represents an absolute name.
std::function< void(const ControlResponse &resp)> CommandContinuation
a function to be called after ControlCommandHandler completes
provides a context for generating response to a StatusDataset request
provides automatic prefix propagation feature
std::function< void(const Name &prefix, const Interest &interest, const ControlParameters *params, const AcceptContinuation &accept, const RejectContinuation &reject)> Authorization
a function that performs authorization
void onRibUpdateFailure(const RibUpdate &update, uint32_t code, const std::string &error)
void setConfigFile(ConfigFile &configFile)