26 #ifndef NFD_RIB_RIB_MANAGER_HPP 27 #define NFD_RIB_RIB_MANAGER_HPP 35 #include <ndn-cxx/encoding/buffer-stream.hpp> 36 #include <ndn-cxx/security/validator-config.hpp> 37 #include <ndn-cxx/mgmt/nfd/face-monitor.hpp> 38 #include <ndn-cxx/mgmt/nfd/controller.hpp> 39 #include <ndn-cxx/mgmt/nfd/control-command.hpp> 40 #include <ndn-cxx/mgmt/nfd/control-response.hpp> 41 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp> 55 class Error :
public std::runtime_error
60 :
std::runtime_error(what)
87 onConfig(
const ConfigSection& configSection,
bool isDryRun,
const std::string& filename);
90 registerTopPrefix(
const Name& topPrefix);
94 registerEntry(
const Name& topPrefix,
const Interest& interest,
99 unregisterEntry(
const Name& topPrefix,
const Interest& interest,
104 listEntries(
const Name& topPrefix,
const Interest& interest,
111 makeAuthorization(
const std::string& verb)
override;
118 onFetchActiveFacesFailure(uint32_t code,
const std::string& reason);
121 onFaceDestroyedEvent(uint64_t faceId);
125 scheduleActiveFaceFetch(
const time::seconds& timeToWait);
133 removeInvalidFaces(
const std::vector<ndn::nfd::FaceStatus>& activeFaces);
145 onCommandPrefixAddNextHopSuccess(
const Name& prefix,
152 onEnableLocalFieldsSuccess();
164 bool m_isLocalhopEnabled;
172 static const Name LOCAL_HOST_TOP_PREFIX;
173 static const Name LOCAL_HOP_TOP_PREFIX;
174 static const std::string MGMT_MODULE_NAME;
175 static const Name FACES_LIST_DATASET_PREFIX;
176 static const time::seconds ACTIVE_FACE_FETCH_INTERVAL;
179 typedef std::set<uint64_t> FaceIdSet;
182 FaceIdSet m_registeredFaces;
184 std::function<void(const Name& topPrefix)> m_addTopPrefix;
190 #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
The validator which can be set up via a configuration file.
configuration file parsing utility
The packet signing interface.
base class of NFD ControlCommand
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)
std::shared_ptr< ns3::EventId > EventId
ndn::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.
boost::property_tree::ptree ConfigSection
Name abstraction to represent 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)