A collection of common functions shared by all NFD managers, such as communicating with the dispatcher and command validator. More...
#include <manager-base.hpp>
Classes | |
class | Error |
Public Member Functions | |
virtual | ~ManagerBase () |
const std::string & | getModule () const |
Protected Types | |
using | ControlCommandHandler = std::function< void(const ControlCommand &command, const Name &prefix, const Interest &interest, const ControlParameters ¶meters, const ndn::mgmt::CommandContinuation done)> |
Protected Member Functions | |
ManagerBase (const std::string &module, Dispatcher &dispatcher) | |
ManagerBase (const std::string &module, Dispatcher &dispatcher, CommandAuthenticator &authenticator) | |
template<typename Command > | |
void | registerCommandHandler (const std::string &verb, const ControlCommandHandler &handler) |
void | registerStatusDatasetHandler (const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler) |
ndn::mgmt::PostNotification | registerNotificationStream (const std::string &verb) |
void | extractRequester (const Interest &interest, ndn::mgmt::AcceptContinuation accept) |
Extracts the requester from a ControlCommand request. More... | |
A collection of common functions shared by all NFD managers, such as communicating with the dispatcher and command validator.
Definition at line 47 of file manager-base.hpp.
|
protected |
Definition at line 76 of file manager-base.hpp.
|
virtualdefault |
|
protected |
Definition at line 30 of file manager-base.cpp.
|
protected |
Definition at line 36 of file manager-base.cpp.
|
inline |
Definition at line 60 of file manager-base.hpp.
|
inlineprotected |
Definition at line 152 of file manager-base.hpp.
References ndn::mgmt::Dispatcher::addControlCommand().
|
protected |
Definition at line 47 of file manager-base.cpp.
References ndn::mgmt::Dispatcher::addStatusDataset(), and ndn::mgmt::makeAcceptAllAuthorization().
Referenced by nfd::CsManager::CsManager(), nfd::FaceManager::FaceManager(), nfd::FibManager::FibManager(), nfd::RibManager::RibManager(), and nfd::StrategyChoiceManager::StrategyChoiceManager().
|
protected |
Definition at line 56 of file manager-base.cpp.
References ndn::mgmt::Dispatcher::addNotificationStream().
Referenced by nfd::FaceManager::FaceManager().
|
protected |
Extracts the requester from a ControlCommand request.
This is called after the signature has been validated.
interest | a request for ControlCommand |
accept | callback of successful validation, takes the requester string as a argument |
Definition at line 62 of file manager-base.cpp.
References ndn::Name::at(), ndn::Block::blockFromValue(), ndn::SignatureInfo::getKeyLocator(), ndn::KeyLocator::getName(), ndn::Interest::getName(), ndn::KeyLocator::getType(), ndn::SignatureInfo::hasKeyLocator(), ns3::ndn::Name, ndn::signed_interest::POS_SIG_INFO, and ndn::Name::toUri().