define the RemoteRegistrator class, which handles the registration/unregistration to remote hub(s). More...
#include <remote-registrator.hpp>


Classes | |
| class | Error |
Public Member Functions | |
| RemoteRegistrator (ndn::nfd::Controller &controller, ndn::KeyChain &keyChain, Rib &rib) | |
| ~RemoteRegistrator () | |
| void | loadConfig (const ConfigSection &configSection) |
| load the "remote_register" section from config file More... | |
| void | enable () |
| enable remote registration/unregistration. More... | |
| void | disable () |
| disable remote registration/unregistration. More... | |
| void | registerPrefix (const Name &prefix) |
| register a prefix to remote hub(s). More... | |
| void | unregisterPrefix (const Name &prefix) |
| unregister a prefix from remote hub(s). More... | |
define the RemoteRegistrator class, which handles the registration/unregistration to remote hub(s).
Definition at line 48 of file remote-registrator.hpp.
| nfd::rib::RemoteRegistrator::RemoteRegistrator | ( | ndn::nfd::Controller & | controller, |
| ndn::KeyChain & | keyChain, | ||
| Rib & | rib | ||
| ) |
Definition at line 43 of file remote-registrator.cpp.
Referenced by nfd::rib::RemoteRegistrator::Error::Error().
| nfd::rib::RemoteRegistrator::~RemoteRegistrator | ( | ) |
Definition at line 55 of file remote-registrator.cpp.
References nfd::scheduler::cancel().
Referenced by nfd::rib::RemoteRegistrator::Error::Error().
| void nfd::rib::RemoteRegistrator::loadConfig | ( | const ConfigSection & | configSection | ) |
load the "remote_register" section from config file
| configSection | the sub section in "rib" section. |
Definition at line 65 of file remote-registrator.cpp.
References NFD_LOG_INFO, ndn::nfd::ROUTE_ORIGIN_CLIENT, ndn::nfd::ControlParameters::setCost(), ndn::nfd::ControlParameters::setFaceId(), ndn::nfd::ControlParameters::setOrigin(), ndn::nfd::CommandOptions::setPrefix(), and ndn::nfd::CommandOptions::setTimeout().
Referenced by nfd::rib::RemoteRegistrator::Error::Error(), and nfd::rib::RibManager::setConfigFile().
| void nfd::rib::RemoteRegistrator::enable | ( | ) |
enable remote registration/unregistration.
Definition at line 120 of file remote-registrator.cpp.
References nfd::rib::Rib::afterEraseEntry, nfd::rib::Rib::afterInsertEntry, registerPrefix(), and unregisterPrefix().
Referenced by nfd::rib::RemoteRegistrator::Error::Error(), and nfd::rib::RibManager::setConfigFile().
| void nfd::rib::RemoteRegistrator::disable | ( | ) |
disable remote registration/unregistration.
Definition at line 136 of file remote-registrator.cpp.
References ndn::util::signal::ScopedConnection::disconnect().
Referenced by nfd::rib::RemoteRegistrator::Error::Error(), and nfd::rib::RibManager::setConfigFile().
| void nfd::rib::RemoteRegistrator::registerPrefix | ( | const Name & | prefix | ) |
register a prefix to remote hub(s).
For the input prefix, we find the longest identity in the key-chain that can sign it, and then register this identity to remote hub(s).
| prefix | the prefix being registered in local RIB. |
Definition at line 143 of file remote-registrator.cpp.
References ndn::Name::getPrefix(), ndn::Name::isPrefixOf(), NFD_LOG_INFO, ndn::nfd::ControlParameters::setName(), ndn::nfd::CommandOptions::setSigningInfo(), and ndn::security::signingByIdentity().
Referenced by enable(), and nfd::rib::RemoteRegistrator::Error::Error().
| void nfd::rib::RemoteRegistrator::unregisterPrefix | ( | const Name & | prefix | ) |
unregister a prefix from remote hub(s).
For the input prefix, if the longest identity can sign it is already registered remotely, that identity should be unregistered from remote hub(s).
| prefix | the prefix being unregistered in local RIB. |
Definition at line 205 of file remote-registrator.cpp.
References nfd::scheduler::cancel(), ndn::nfd::ControlParameters::getName(), ndn::Name::getPrefix(), ndn::Name::isPrefixOf(), NFD_LOG_DEBUG, NFD_LOG_INFO, nfd::scheduler::schedule(), ndn::nfd::ControlParameters::setName(), ndn::nfd::CommandOptions::setSigningInfo(), ndn::security::signingByIdentity(), ndn::nfd::Controller::start(), and ndn::nfd::ControlParameters::unsetCost().
Referenced by enable(), and nfd::rib::RemoteRegistrator::Error::Error().