#include <prefix-update-processor.hpp>
Inheritance diagram for nlsr::update::PrefixUpdateProcessor:
Collaboration diagram for nlsr::update::PrefixUpdateProcessor: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::Name &prefix, const ndn::Interest &interest, const ndn::mgmt::ControlParameters ¶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 returns bool from the overridden function while nullopt here More... | |
| std::optional< bool > | afterWithdraw (const ndn::Name &prefix) override |
| save an advertised prefix to the nlsr configuration file returns bool from the overridden function while nullopt here 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::Name &prefix, const ndn::Interest &interest, const ndn::mgmt::ControlParameters ¶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 Member Functions | |
| ndn::PartialName | makeRelPrefix (const std::string &verb) const |
| generate the relative prefix for a handler by appending the verb name to the module name More... | |
| template<typename T > | |
| bool | validateParameters (const ndn::mgmt::ControlParameters ¶meters) |
| validate the parameters for a given command More... | |
Protected Attributes | |
| ndn::mgmt::Dispatcher & | m_dispatcher |
| Lsdb & | m_lsdb |
| NamePrefixList & | m_namePrefixList |
Definition at line 37 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 57 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 131 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 54 of file manager-base.cpp.
|
overridevirtual |
save an advertised prefix to the nlsr configuration file returns bool from the overridden function while nullopt here
Reimplemented from nlsr::update::CommandManagerBase.
Definition at line 185 of file prefix-update-processor.cpp.
|
overridevirtual |
save an advertised prefix to the nlsr configuration file returns bool from the overridden function while nullopt here
Reimplemented from nlsr::update::CommandManagerBase.
Definition at line 191 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 112 of file prefix-update-processor.cpp.
|
inline |
Definition at line 76 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 105 of file prefix-update-processor.cpp.
|
protectedinherited |
generate the relative prefix for a handler by appending the verb name to the module name
Definition at line 38 of file manager-base.cpp.
|
inlineprotectedinherited |
validate the parameters for a given command
Definition at line 72 of file manager-base.hpp.
|
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 96 of file manager-base.cpp.
|
protectedinherited |
Definition at line 92 of file manager-base.hpp.
|
protectedinherited |
Definition at line 147 of file manager-base.hpp.
|
protectedinherited |
Definition at line 146 of file manager-base.hpp.