All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ndn::ConfigChecker Class Referenceabstract

A ConfigChecker is an abstract base class for ConfigNameRelationChecker, etc. More...

#include <config-checker.hpp>

Inheritance diagram for ndn::ConfigChecker:
ndn::ConfigHyperRelationChecker ndn::ConfigNameRelationChecker ndn::ConfigRegexChecker

Public Member Functions

bool check (bool isForInterest, const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)
 Check if the packet name ane KeyLocator name satisfy this checker's conditions. More...
 

Static Public Member Functions

static ptr_lib::shared_ptr
< ConfigChecker
create (const BoostInfoTree &configSection)
 Create a checker from the configuration section. More...
 

Protected Member Functions

virtual bool checkNames (const Name &packetName, const Name &keyLocatorName, const ptr_lib::shared_ptr< ValidationState > &state)=0
 Check if the packet name ane KeyLocator name satisfy this checker's conditions. More...
 

Detailed Description

A ConfigChecker is an abstract base class for ConfigNameRelationChecker, etc.

used by ValidatorConfig to check if a packet name and KeyLocator satisfy the conditions in a configuration section.

Member Function Documentation

bool ndn::ConfigChecker::check ( bool  isForInterest,
const Name packetName,
const Name keyLocatorName,
const ptr_lib::shared_ptr< ValidationState > &  state 
)

Check if the packet name ane KeyLocator name satisfy this checker's conditions.

Parameters
isForInterestTrue if packetName is for an Interest, false if for a Data packet.
packetNameThe packet name. For a signed interest, the last two components are skipped but not removed.
keyLocatorNameThe KeyLocator's name.
stateThis calls state.fail() if the packet is invalid.
Returns
True if further signature verification is needed, or false if the packet is immediately determined to be invalid in which case this calls state.fail() with the proper code and message.
virtual bool ndn::ConfigChecker::checkNames ( const Name packetName,
const Name keyLocatorName,
const ptr_lib::shared_ptr< ValidationState > &  state 
)
protectedpure virtual

Check if the packet name ane KeyLocator name satisfy this checker's conditions.

Parameters
packetNameThe packet name, which is already stripped of signature components if this is a signed Interest name.
keyLocatorNameThe KeyLocator's name.
stateThis calls state.fail() if the packet is invalid.
Returns
True if further signature verification is needed, or false if the packet is immediately determined to be invalid in which case this calls state.fail() with the proper code and message.

Implemented in ndn::ConfigHyperRelationChecker, ndn::ConfigRegexChecker, and ndn::ConfigNameRelationChecker.

static ptr_lib::shared_ptr<ConfigChecker> ndn::ConfigChecker::create ( const BoostInfoTree configSection)
static

Create a checker from the configuration section.

Parameters
configSectionThe section containing the definition of the checker, e.g. one of <validation.rule.checker>.
Returns
A new checker created from the configuration section.

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