26 #ifndef NFD_RIB_RIB_MANAGER_HPP 27 #define NFD_RIB_RIB_MANAGER_HPP 50 class Error :
public std::runtime_error
53 using std::runtime_error::runtime_error;
142 slRenew(
const Name&
name, uint64_t faceId, time::milliseconds maxLifetime,
160 enum class RibUpdateResult
168 getSlAnnounceResultFromRibUpdateResult(RibUpdateResult r);
177 beginAddRoute(
const Name&
name,
Route route, optional<time::nanoseconds> expires,
178 const std::function<
void(RibUpdateResult)>& done);
187 const std::function<
void(RibUpdateResult)>& done);
190 beginRibUpdate(
const RibUpdate& update,
const std::function<
void(RibUpdateResult)>& done);
194 registerTopPrefix(
const Name& topPrefix);
199 registerEntry(
const Name& topPrefix,
const Interest& interest,
206 unregisterEntry(
const Name& topPrefix,
const Interest& interest,
213 listEntries(
const Name& topPrefix,
const Interest& interest,
220 makeAuthorization(
const std::string& verb)
override;
227 onFetchActiveFacesFailure(uint32_t code,
const std::string& reason);
230 onFaceDestroyedEvent(uint64_t faceId);
234 scheduleActiveFaceFetch(
const time::seconds& timeToWait);
237 removeInvalidFaces(
const std::vector<ndn::nfd::FaceStatus>& activeFaces);
255 bool m_isLocalhopEnabled;
258 using FaceIdSet = std::set<uint64_t>;
259 FaceIdSet m_registeredFaces;
268 #endif // NFD_RIB_RIB_MANAGER_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
void disableLocalhop()
Disallow accepting commands on /localhop/nfd/rib prefix.
a collection of common functions shared by all NFD managers and RIB manager, such as communicating wi...
represents the Routing Information Base
void applyLocalhostConfig(const ConfigSection §ion, const std::string &filename)
Apply localhost_security configuration.
The interface of signing key management.
Serve commands and datasets in NFD RIB management protocol.
represents parameters in a ControlCommand request or response
represents a dispatcher on server side of NFD Management protocol
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
Helper for validator that uses CommandInterest + Config policy and NetworkFetcher.
RIB and FIB have been updated.
represents a Face status change notification
Represents an Interest packet.
void enableLocalhop(const ConfigSection §ion, const std::string &filename)
Apply localhop_security configuration and allow accepting commands on /localhop/nfd/rib prefix.
A subscriber for Face status change notification stream.
A prefix announcement object that represents an application's intent of registering a prefix toward i...
std::function< void(SlAnnounceResult res)> SlAnnounceCallback
Copyright (c) 2011-2015 Regents of the University of California.
the announcement has expired
route does not exist (slRenew only)
represents a route for a name prefix
Provide a communication channel with local or remote NDN forwarder.
NFD Management protocol client.
RibManager(Rib &rib, ndn::Face &face, ndn::KeyChain &keyChain, ndn::nfd::Controller &nfdController, Dispatcher &dispatcher, ndn::util::Scheduler &scheduler)
boost::property_tree::ptree ConfigSection
a config file section
void slAnnounce(const ndn::PrefixAnnouncement &pa, uint64_t faceId, time::milliseconds maxLifetime, const SlAnnounceCallback &cb)
Insert a route by prefix announcement from self-learning strategy.
Represents an absolute name.
std::function< void(const ControlResponse &resp)> CommandContinuation
a function to be called after ControlCommandHandler completes
A scoped handle of scheduled event.
void slFindAnn(const Name &name, const SlFindAnnCallback &cb) const
Retrieve an outgoing prefix announcement for self-learning strategy.
std::function< void(optional< ndn::PrefixAnnouncement >)> SlFindAnnCallback
provides a context for generating response to a StatusDataset request
void slRenew(const Name &name, uint64_t faceId, time::milliseconds maxLifetime, const SlAnnounceCallback &cb)
Renew a route created by prefix announcement from self-learning strategy.
static const Name LOCALHOP_TOP_PREFIX
std::function< void(const Name &prefix, const Interest &interest, const ControlParameters *params, const AcceptContinuation &accept, const RejectContinuation &reject)> Authorization
a function that performs authorization
the announcement cannot be verified against the trust schema
void enableLocalFields()
Enable NDNLP IncomingFaceId field in order to support self-registration commands.
void registerWithNfd()
Start accepting commands and dataset requests.