Classes | |
class | ControlParameters |
base class for a struct that contains ControlCommand parameters More... | |
class | ControlResponse |
ControlCommand response. More... | |
class | Dispatcher |
represents a dispatcher on server side of NFD Management protocol More... | |
class | StatusDatasetContext |
provides a context for generating response to a StatusDataset request More... | |
Typedefs | |
typedef std::function< void(const std::string &requester)> | AcceptContinuation |
a function to be called if authorization is successful More... | |
typedef std::function< void(RejectReply act)> | RejectContinuation |
a function to be called if authorization is rejected More... | |
typedef std::function< void(const Name &prefix, const Interest &interest, const ControlParameters *params, const AcceptContinuation &accept, const RejectContinuation &reject)> | Authorization |
a function that performs authorization More... | |
typedef std::function< bool(const ControlParameters ¶ms)> | ValidateParameters |
a function to validate input ControlParameters More... | |
typedef std::function< void(const ControlResponse &resp)> | CommandContinuation |
a function to be called after ControlCommandHandler completes More... | |
typedef std::function< void(const Name &prefix, const Interest &interest, const ControlParameters ¶ms, const CommandContinuation &done)> | ControlCommandHandler |
a function to handle an authorized ControlCommand More... | |
typedef std::function< void(const Name &prefix, const Interest &interest, StatusDatasetContext &context)> | StatusDatasetHandler |
a function to handle a StatusDataset request More... | |
typedef std::function< void(const Block ¬ification)> | PostNotification |
a function to post a notification More... | |
Enumerations | |
enum | RejectReply { RejectReply::SILENT, RejectReply::STATUS403 } |
indicate how to reply in case authorization is rejected More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, const ControlResponse &response) |
Authorization | makeAcceptAllAuthorization () |
Variables | |
WireEncodable< ControlResponse > | |
WireDecodable< ControlResponse > | |
const time::milliseconds | DEFAULT_FRESHNESS_PERIOD = time::milliseconds(1000) |
const time::milliseconds | DEFAULT_STATUS_DATASET_FRESHNESS_PERIOD = time::milliseconds(1000) |
typedef std::function<void(const std::string& requester)> ndn::mgmt::AcceptContinuation |
a function to be called if authorization is successful
requester | a string that indicates the requester, whose semantics is determined by the Authorization function; this value is intended for logging only, and should not affect how the request is processed |
Definition at line 45 of file dispatcher.hpp.
typedef std::function<void(RejectReply act)> ndn::mgmt::RejectContinuation |
a function to be called if authorization is rejected
Definition at line 60 of file dispatcher.hpp.
typedef std::function<void(const Name& prefix, const Interest& interest, const ControlParameters* params, const AcceptContinuation& accept, const RejectContinuation& reject)> ndn::mgmt::Authorization |
a function that performs authorization
prefix | top-level prefix, e.g., "/localhost/nfd"; This argument can be inspected to allow Interests only under a subset of top-level prefixes (e.g., allow "/localhost/nfd" only), or to use different trust model regarding to the prefix. |
interest | incoming Interest |
params | parsed ControlParameters for ControlCommand, otherwise nullptr; This is guaranteed to be not-null and have correct type for the command, but may not be valid (e.g., can have missing fields). |
Either accept or reject must be called after authorization completes.
Definition at line 77 of file dispatcher.hpp.
typedef std::function<bool(const ControlParameters& params)> ndn::mgmt::ValidateParameters |
a function to validate input ControlParameters
params | parsed ControlParameters; This is guaranteed to have correct type for the command. |
Definition at line 90 of file dispatcher.hpp.
typedef std::function<void(const ControlResponse& resp)> ndn::mgmt::CommandContinuation |
a function to be called after ControlCommandHandler completes
resp | the response to be sent to requester |
Definition at line 95 of file dispatcher.hpp.
typedef std::function<void(const Name& prefix, const Interest& interest, const ControlParameters& params, const CommandContinuation& done)> ndn::mgmt::ControlCommandHandler |
a function to handle an authorized ControlCommand
prefix | top-level prefix, e.g., "/localhost/nfd"; |
interest | incoming Interest |
params | parsed ControlParameters; This is guaranteed to have correct type for the command, and is valid (e.g., has all required fields). |
Definition at line 106 of file dispatcher.hpp.
typedef std::function<void(const Name& prefix, const Interest& interest, StatusDatasetContext& context)> ndn::mgmt::StatusDatasetHandler |
a function to handle a StatusDataset request
prefix | top-level prefix, e.g., "/localhost/nfd"; |
interest | incoming Interest; its Name doesn't contain version and segment components |
This function can generate zero or more blocks and pass them to append
, and must call end
upon completion.
Definition at line 117 of file dispatcher.hpp.
typedef std::function<void(const Block& notification)> ndn::mgmt::PostNotification |
a function to post a notification
Definition at line 123 of file dispatcher.hpp.
|
strong |
indicate how to reply in case authorization is rejected
Enumerator | |
---|---|
SILENT |
do not reply |
STATUS403 |
reply with a ControlResponse where StatusCode is 403 |
Definition at line 49 of file dispatcher.hpp.
std::ostream & ndn::mgmt::operator<< | ( | std::ostream & | os, |
const ControlResponse & | response | ||
) |
Definition at line 98 of file control-response.cpp.
References ndn::mgmt::ControlResponse::getCode(), and ndn::mgmt::ControlResponse::getText().
Referenced by ndn::mgmt::ControlResponse::setBody().
Authorization ndn::mgmt::makeAcceptAllAuthorization | ( | ) |
Definition at line 34 of file dispatcher.cpp.
References websocketpp::extensions::permessage_deflate::mode::accept.
Referenced by nfd::ForwarderStatusManager::ForwarderStatusManager(), and nfd::ManagerBase::registerStatusDatasetHandler().
ndn::mgmt::WireEncodable< ControlResponse > |
Definition at line 30 of file control-response.cpp.
ndn::mgmt::WireDecodable< ControlResponse > |
Definition at line 31 of file control-response.cpp.
const time::milliseconds ndn::mgmt::DEFAULT_FRESHNESS_PERIOD = time::milliseconds(1000) |
Definition at line 31 of file dispatcher.cpp.
Referenced by ndn::mgmt::Dispatcher::removeTopPrefix().
const time::milliseconds ndn::mgmt::DEFAULT_STATUS_DATASET_FRESHNESS_PERIOD = time::milliseconds(1000) |
Definition at line 27 of file status-dataset-context.cpp.