NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::CommandValidator Class Reference

#include <command-validator.hpp>

Classes

class  Error
 

Public Member Functions

 CommandValidator ()
 
 ~CommandValidator ()
 
void setConfigFile (ConfigFile &configFile)
 
void onConfig (const ConfigSection &section, bool isDryRun, const std::string &filename)
 
void addSupportedPrivilege (const std::string &privilege)
 
void addInterestRule (const std::string &regex, const ndn::IdentityCertificate &certificate)
 
void addInterestRule (const std::string &regex, const Name &keyName, const ndn::PublicKey &publicKey)
 
void validate (const Interest &interest, const ndn::OnInterestValidated &onValidated, const ndn::OnInterestValidationFailed &onValidationFailed)
 

Detailed Description

Definition at line 34 of file command-validator.hpp.

Constructor & Destructor Documentation

§ CommandValidator()

nfd::CommandValidator::CommandValidator ( )

Definition at line 38 of file command-validator.cpp.

Referenced by nfd::CommandValidator::Error::Error().

§ ~CommandValidator()

nfd::CommandValidator::~CommandValidator ( )

Definition at line 43 of file command-validator.cpp.

Referenced by nfd::CommandValidator::Error::Error().

Member Function Documentation

§ setConfigFile()

void nfd::CommandValidator::setConfigFile ( ConfigFile configFile)

§ onConfig()

void nfd::CommandValidator::onConfig ( const ConfigSection section,
bool  isDryRun,
const std::string &  filename 
)
Parameters
section"authorizations" section to parse
isDryRuntrue if performing a dry run of configuration, false otherwise
filenamefilename of configuration file
Exceptions
ConfigFile::Erroron parse error

Definition at line 66 of file command-validator.cpp.

References nfd::aggregateErrors(), NFD_LOG_DEBUG, NFD_LOG_INFO, and NFD_LOG_WARN.

Referenced by nfd::CommandValidator::Error::Error(), and setConfigFile().

§ addSupportedPrivilege()

void nfd::CommandValidator::addSupportedPrivilege ( const std::string &  privilege)
Parameters
privilegename of privilege to add
Exceptions
CommandValidator::Erroron duplicated privilege

Definition at line 213 of file command-validator.cpp.

Referenced by nfd::CommandValidator::Error::Error(), and nfd::ManagerBase::ManagerBase().

§ addInterestRule() [1/2]

void nfd::CommandValidator::addInterestRule ( const std::string &  regex,
const ndn::IdentityCertificate certificate 
)
inline

Definition at line 92 of file command-validator.hpp.

Referenced by nfd::CommandValidator::Error::Error().

§ addInterestRule() [2/2]

void nfd::CommandValidator::addInterestRule ( const std::string &  regex,
const Name keyName,
const ndn::PublicKey publicKey 
)
inline

Definition at line 99 of file command-validator.hpp.

§ validate()

void nfd::CommandValidator::validate ( const Interest interest,
const ndn::OnInterestValidated onValidated,
const ndn::OnInterestValidationFailed onValidationFailed 
)
inline

The documentation for this class was generated from the following files: