|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
26 #ifndef NFD_DAEMON_MGMT_MANAGER_BASE_HPP
27 #define NFD_DAEMON_MGMT_MANAGER_BASE_HPP
50 class Error :
public std::runtime_error
53 using std::runtime_error::runtime_error;
81 template<
typename Command>
110 makeAuthorization(
const std::string& verb);
126 handleCommand(shared_ptr<ControlCommand> command,
139 makeRelPrefix(
const std::string& verb)
145 std::string m_module;
150 template<
typename Command>
155 auto command = make_shared<Command>();
159 makeAuthorization(verb),
160 bind(&ManagerBase::validateParameters, std::cref(*command), _1),
161 bind(&ManagerBase::handleCommand, command, handler, _1, _2, _3, _4));
166 #endif // NFD_DAEMON_MGMT_MANAGER_BASE_HPP
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
std::function< void(const std::string &requester)> AcceptContinuation
a function to be called if authorization is successful
Name PartialName
Represents an arbitrary sequence of name components.
std::function< void(const ControlResponse &resp)> CommandContinuation
a function to be called after ControlCommandHandler completes
mgmt::ControlResponse ControlResponse
std::function< void(const Name &prefix, const Interest &interest, StatusDatasetContext &context)> StatusDatasetHandler
a function to handle a StatusDataset request
void registerStatusDatasetHandler(const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler)
const std::string & getModule() const
std::function< void(const Block ¬ification)> PostNotification
a function to post a notification
base class for a struct that contains ControlCommand parameters
ManagerBase(const std::string &module, Dispatcher &dispatcher)
Represents an absolute name.
Copyright (c) 2011-2015 Regents of the University of California.
ndn::mgmt::PostNotification registerNotificationStream(const std::string &verb)
Name & append(const Component &component)
Append a component.
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 addControlCommand(const PartialName &relPrefix, Authorization authorize, ValidateParameters validate, ControlCommandHandler handle)
register a ControlCommand
void registerCommandHandler(const std::string &verb, const ControlCommandHandler &handler)
Represents an Interest packet.
A collection of common functions shared by all NFD managers, such as communicating with the dispatche...
represents parameters in a ControlCommand request or response
base class of NFD ControlCommand
represents a dispatcher on server side of NFD Management protocol
Provides ControlCommand authorization according to NFD configuration file.
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED
void extractRequester(const Interest &interest, ndn::mgmt::AcceptContinuation accept)
Extracts the requester from a ControlCommand request.
std::function< void(const ControlCommand &command, const Name &prefix, const Interest &interest, const ControlParameters ¶meters, const ndn::mgmt::CommandContinuation done)> ControlCommandHandler