#include <prefix-update-processor.hpp>
Public Member Functions | |
PrefixUpdateProcessor (ndn::mgmt::Dispatcher &dispatcher, ndn::security::ValidatorConfig &validator, NamePrefixList &namePrefixList, Lsdb &lsdb, const std::string &configFileName) | |
bool | addOrDeletePrefix (const ndn::Name &prefix, bool addPrefix) |
Add or delete an advertise or withdrawn prefix to the nlsr configuration file. More... | |
void | advertiseAndInsertPrefix (const ndn::mgmt::ControlParametersBase ¶meters, const ndn::mgmt::CommandContinuation &done) |
Add desired name prefix to the advertised name prefix list or insert a prefix into the FIB if parameters is valid. More... | |
std::optional< bool > | afterAdvertise (const ndn::Name &prefix) override |
Save an advertised prefix to the nlsr configuration file. More... | |
std::optional< bool > | afterWithdraw (const ndn::Name &prefix) override |
Save an advertised prefix to the nlsr configuration file. More... | |
bool | checkForPrefixInFile (const std::string prefix) |
Check if a prefix exists in the nlsr configuration file. More... | |
ndn::security::ValidatorConfig & | getValidator () |
void | loadValidator (ConfigSection section, const std::string &filename) |
Load the validator's configuration from a section of a configuration file. More... | |
void | withdrawAndRemovePrefix (const ndn::mgmt::ControlParametersBase ¶meters, const ndn::mgmt::CommandContinuation &done) |
Remove desired name prefix from the advertised name prefix list or remove a prefix from the FIB if parameters is valid. More... | |
Protected Attributes | |
ndn::mgmt::Dispatcher & | m_dispatcher |
Lsdb & | m_lsdb |
NamePrefixList & | m_namePrefixList |
Definition at line 35 of file prefix-update-processor.hpp.
nlsr::update::PrefixUpdateProcessor::PrefixUpdateProcessor | ( | ndn::mgmt::Dispatcher & | dispatcher, |
ndn::security::ValidatorConfig & | validator, | ||
NamePrefixList & | namePrefixList, | ||
Lsdb & | lsdb, | ||
const std::string & | configFileName | ||
) |
Definition at line 51 of file prefix-update-processor.cpp.
bool nlsr::update::PrefixUpdateProcessor::addOrDeletePrefix | ( | const ndn::Name & | prefix, |
bool | addPrefix | ||
) |
Add or delete an advertise or withdrawn prefix to the nlsr configuration file.
Definition at line 118 of file prefix-update-processor.cpp.
|
inherited |
Add desired name prefix to the advertised name prefix list or insert a prefix into the FIB if parameters is valid.
Definition at line 43 of file command-processor.cpp.
|
overridevirtual |
Save an advertised prefix to the nlsr configuration file.
Reimplemented from nlsr::update::CommandProcessor.
Definition at line 172 of file prefix-update-processor.cpp.
|
overridevirtual |
Save an advertised prefix to the nlsr configuration file.
Reimplemented from nlsr::update::CommandProcessor.
Definition at line 178 of file prefix-update-processor.cpp.
bool nlsr::update::PrefixUpdateProcessor::checkForPrefixInFile | ( | const std::string | prefix | ) |
Check if a prefix exists in the nlsr configuration file.
Definition at line 100 of file prefix-update-processor.cpp.
|
inline |
Definition at line 74 of file prefix-update-processor.hpp.
void nlsr::update::PrefixUpdateProcessor::loadValidator | ( | ConfigSection | section, |
const std::string & | filename | ||
) |
Load the validator's configuration from a section of a configuration file.
Loads the state of the validator for prefix update commands by reading a section from a configuration file. This function is expecting the section to be from a Boost property tree object.
PrefixUpdateProcessor::Error | If configuration fails to load successfully |
Definition at line 93 of file prefix-update-processor.cpp.
|
inherited |
Remove desired name prefix from the advertised name prefix list or remove a prefix from the FIB if parameters is valid.
Definition at line 82 of file command-processor.cpp.
|
protectedinherited |
Definition at line 87 of file command-processor.hpp.
|
protectedinherited |
Definition at line 89 of file command-processor.hpp.
|
protectedinherited |
Definition at line 88 of file command-processor.hpp.