NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::v2::validator_config::Checker Class Referenceabstract

#include <checker.hpp>

Inheritance diagram for ndn::security::v2::validator_config::Checker:
Collaboration diagram for ndn::security::v2::validator_config::Checker:

Public Member Functions

virtual ~Checker ()=default
 
bool check (uint32_t pktType, const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state)
 Check if packet name ane KeyLocator satisfy the checker's conditions. More...
 

Static Public Member Functions

static unique_ptr< Checkercreate (const ConfigSection &configSection, const std::string &configFilename)
 create a checker from configuration section More...
 

Protected Member Functions

virtual bool checkNames (const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state)=0
 

Detailed Description

Definition at line 38 of file checker.hpp.

Constructor & Destructor Documentation

virtual ndn::security::v2::validator_config::Checker::~Checker ( )
virtualdefault

Member Function Documentation

bool ndn::security::v2::validator_config::Checker::check ( uint32_t  pktType,
const Name pktName,
const Name klName,
const shared_ptr< ValidationState > &  state 
)

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

Parameters
pktTypetlv::Interest or tlv::Data
pktNamepacket's name
klNameKeyLocator's name
stateValidation state
Return values
falsedata is immediately invalid. Will call state::fail() with proper code and message.
truefurther signature verification is needed.

Definition at line 38 of file checker.cpp.

References checkNames(), ndn::tlv::Data, ndn::Name::getPrefix(), ndn::tlv::Interest, ndn::signed_interest::MIN_SIZE, and ndn::Name::size().

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

create a checker from configuration section

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

Definition at line 126 of file checker.cpp.

References ndn::security::v2::validator_config::getNameRelationFromString(), ndn::security::v2::validator_config::IS_PREFIX_OF, and ns3::ndn::Name.

Referenced by ndn::security::v2::validator_config::Rule::create().

virtual bool ndn::security::v2::validator_config::Checker::checkNames ( const Name pktName,
const Name klName,
const shared_ptr< ValidationState > &  state 
)
protectedpure virtual

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