nlsr::update::PrefixUpdateProcessor Class Reference

#include <prefix-update-processor.hpp>

Inheritance diagram for nlsr::update::PrefixUpdateProcessor:
[legend]
Collaboration diagram for nlsr::update::PrefixUpdateProcessor:
[legend]

Public Member Functions

 PrefixUpdateProcessor (ndn::mgmt::Dispatcher &dispatcher, ndn::security::ValidatorConfig &validator, NamePrefixList &namePrefixList, Lsdb &lsdb, const std::string &configFileName)
 
void loadValidator (ConfigSection section, const std::string &filename)
 Load the validator's configuration from a section of a configuration file. More...
 
bool addOrDeletePrefix (const ndn::Name &prefix, bool addPrefix)
 Add or delete an advertise or withdrawn prefix to the nlsr configuration file. More...
 
ndn::optional< bool > afterAdvertise (const ndn::Name &prefix)
 save an advertised prefix to the nlsr configuration file returns bool from the overridden function while nullopt here More...
 
ndn::optional< bool > afterWithdraw (const ndn::Name &prefix)
 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 advertiseAndInsertPrefix (const ndn::Name &prefix, const ndn::Interest &interest, const ndn::mgmt::ControlParameters &parameters, 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...
 
void withdrawAndRemovePrefix (const ndn::Name &prefix, const ndn::Interest &interest, const ndn::mgmt::ControlParameters &parameters, 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 &parameters)
 validate the parameters for a given command More...
 

Protected Attributes

NamePrefixListm_namePrefixList
 
Lsdbm_lsdb
 
ndn::mgmt::Dispatcher & m_dispatcher
 

Detailed Description

Definition at line 43 of file prefix-update-processor.hpp.

Constructor & Destructor Documentation

nlsr::update::PrefixUpdateProcessor::PrefixUpdateProcessor ( ndn::mgmt::Dispatcher &  dispatcher,
ndn::security::ValidatorConfig &  validator,
NamePrefixList namePrefixList,
Lsdb lsdb,
const std::string &  configFileName 
)

Definition at line 53 of file prefix-update-processor.cpp.

Here is the call graph for this function:

Member Function Documentation

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 127 of file prefix-update-processor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::update::CommandManagerBase::advertiseAndInsertPrefix ( const ndn::Name &  prefix,
const ndn::Interest &  interest,
const ndn::mgmt::ControlParameters &  parameters,
const ndn::mgmt::CommandContinuation &  done 
)
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.

Here is the call graph for this function:

Here is the caller graph for this function:

ndn::optional< bool > nlsr::update::PrefixUpdateProcessor::afterAdvertise ( const ndn::Name &  prefix)
virtual

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 181 of file prefix-update-processor.cpp.

Here is the call graph for this function:

ndn::optional< bool > nlsr::update::PrefixUpdateProcessor::afterWithdraw ( const ndn::Name &  prefix)
virtual

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 187 of file prefix-update-processor.cpp.

Here is the call graph for this function:

bool nlsr::update::PrefixUpdateProcessor::checkForPrefixInFile ( const std::string  prefix)

Check if a prefix exists in the nlsr configuration file.

Definition at line 108 of file prefix-update-processor.cpp.

Here is the caller graph for this function:

ndn::security::ValidatorConfig& nlsr::update::PrefixUpdateProcessor::getValidator ( )
inline

Definition at line 82 of file prefix-update-processor.hpp.

Here is the caller graph for this function:

void nlsr::update::PrefixUpdateProcessor::loadValidator ( ConfigSection  section,
const std::string &  filename 
)

Load the validator's configuration from a section of a configuration file.

See also
ConfFileProcessor::processConfFile
ConfFileProcessor::processConfSectionSecurity

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.

Exceptions
PrefixUpdateProcessor::ErrorIf configuration fails to load successfully

Definition at line 101 of file prefix-update-processor.cpp.

ndn::PartialName nlsr::update::ManagerBase::makeRelPrefix ( const std::string &  verb) const
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.

Here is the caller graph for this function:

template<typename T >
bool nlsr::update::ManagerBase::validateParameters ( const ndn::mgmt::ControlParameters &  parameters)
inlineprotectedinherited

validate the parameters for a given command

Definition at line 77 of file manager-base.hpp.

void nlsr::update::CommandManagerBase::withdrawAndRemovePrefix ( const ndn::Name &  prefix,
const ndn::Interest &  interest,
const ndn::mgmt::ControlParameters &  parameters,
const ndn::mgmt::CommandContinuation &  done 
)
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.

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

ndn::mgmt::Dispatcher& nlsr::update::ManagerBase::m_dispatcher
protectedinherited

Definition at line 98 of file manager-base.hpp.

Lsdb& nlsr::update::CommandManagerBase::m_lsdb
protectedinherited

Definition at line 146 of file manager-base.hpp.

NamePrefixList& nlsr::update::CommandManagerBase::m_namePrefixList
protectedinherited

Definition at line 145 of file manager-base.hpp.