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

#include <checker.hpp>

Inheritance diagram for ndn::security::conf::Checker:

Public Types

enum  { INTEREST_SIG_VALUE = -1, INTEREST_SIG_INFO = -2 }
 
typedef function< void(const shared_ptr< const Interest > &)> OnInterestChecked
 
typedef function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestCheckFailed
 
typedef function< void(const shared_ptr< const Data > &)> OnDataChecked
 
typedef function< void(const shared_ptr< const Data > &, const std::string &)> OnDataCheckFailed
 

Public Member Functions

virtual ~Checker ()
 
virtual int8_t check (const Data &data, const OnDataChecked &onValidated, const OnDataCheckFailed &onValidationFailed)=0
 check if data satisfies condition defined in the specific checker implementation More...
 
virtual int8_t check (const Interest &interest, const OnInterestChecked &onValidated, const OnInterestCheckFailed &onValidationFailed)=0
 check if interest satisfies condition defined in the specific checker implementation More...
 

Detailed Description

Definition at line 42 of file checker.hpp.

Member Typedef Documentation

◆ OnInterestChecked

typedef function<void(const shared_ptr<const Interest>&)> ndn::security::conf::Checker::OnInterestChecked

Definition at line 45 of file checker.hpp.

◆ OnInterestCheckFailed

typedef function<void(const shared_ptr<const Interest>&, const std::string&)> ndn::security::conf::Checker::OnInterestCheckFailed

Definition at line 47 of file checker.hpp.

◆ OnDataChecked

typedef function<void(const shared_ptr<const Data>&)> ndn::security::conf::Checker::OnDataChecked

Definition at line 48 of file checker.hpp.

◆ OnDataCheckFailed

typedef function<void(const shared_ptr<const Data>&, const std::string&)> ndn::security::conf::Checker::OnDataCheckFailed

Definition at line 49 of file checker.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INTEREST_SIG_VALUE 
INTEREST_SIG_INFO 

Definition at line 51 of file checker.hpp.

Constructor & Destructor Documentation

◆ ~Checker()

virtual ndn::security::conf::Checker::~Checker ( )
inlinevirtual

Definition at line 58 of file checker.hpp.

Member Function Documentation

◆ check() [1/2]

virtual int8_t ndn::security::conf::Checker::check ( const Data data,
const OnDataChecked onValidated,
const OnDataCheckFailed onValidationFailed 
)
pure virtual

check if data satisfies condition defined in the specific checker implementation

Parameters
dataData packet
onValidatedCallback function which is called when data is immediately valid
onValidationFailedCall function which is called when data is immediately invalid
Returns
-1 if data is immediately invalid (onValidationFailed has been called) 1 if data is immediately valid (onValidated has been called) 0 if further signature verification is needed.

Implemented in ndn::security::conf::FixedSignerChecker, and ndn::security::conf::CustomizedChecker.

◆ check() [2/2]

virtual int8_t ndn::security::conf::Checker::check ( const Interest interest,
const OnInterestChecked onValidated,
const OnInterestCheckFailed onValidationFailed 
)
pure virtual

check if interest satisfies condition defined in the specific checker implementation

Parameters
interestInterest packet
onValidatedCallback function which is called when interest is immediately valid
onValidationFailedCall function which is called when interest is immediately invalid
Returns
-1 if interest is immediately invalid (onValidationFailed has been called) 1 if interest is immediately valid (onValidated has been called) 0 if further signature verification is needed.

Implemented in ndn::security::conf::FixedSignerChecker, and ndn::security::conf::CustomizedChecker.


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