ndn::security::v2::validator_config::RegexNameFilter Class Reference

Filter to check that packet name matches the specified regular expression. More...

#include <filter.hpp>

+ Inheritance diagram for ndn::security::v2::validator_config::RegexNameFilter:
+ Collaboration diagram for ndn::security::v2::validator_config::RegexNameFilter:

Public Member Functions

 RegexNameFilter (const Regex &regex)
 
bool match (uint32_t pktType, const Name &pktName)
 

Static Public Member Functions

static unique_ptr< Filtercreate (const ConfigSection &configSection, const std::string &configFilename)
 Create a filter from the configuration section. More...
 

Detailed Description

Filter to check that packet name matches the specified regular expression.

The following configuration

filter
{
type name
regex ^[^<KEY>]*<KEY><>*<ksk-.*>$
}

creates

RegexNameFilter("^[^<KEY>]*<KEY><>*<ksk-.*>$");
See also
Regex

Definition at line 123 of file filter.hpp.

Constructor & Destructor Documentation

ndn::security::v2::validator_config::RegexNameFilter::RegexNameFilter ( const Regex regex)
explicit

Definition at line 64 of file filter.cpp.

Member Function Documentation

unique_ptr< Filter > ndn::security::v2::validator_config::Filter::create ( const ConfigSection configSection,
const std::string &  configFilename 
)
staticinherited

Create a filter from the configuration section.

Parameters
configSectionThe section containing the definition of filter.
configFilenameThe configuration file name.
Returns
a filter created from configuration

Definition at line 76 of file filter.cpp.

bool ndn::security::v2::validator_config::Filter::match ( uint32_t  pktType,
const Name pktName 
)
inherited

Definition at line 37 of file filter.cpp.