NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::conf::Rule< Packet > Class Template Reference

#include <rule.hpp>

Public Member Functions

 Rule (const std::string &id)
 
virtual ~Rule ()
 
const std::string & getId ()
 
void addFilter (const shared_ptr< Filter > &filter)
 
void addChecker (const shared_ptr< Checker > &checker)
 
bool match (const Packet &packet)
 
template<class ValidatedCallback , class ValidationFailureCallback >
int8_t check (const Packet &packet, const ValidatedCallback &onValidated, const ValidationFailureCallback &onValidationFailed)
 check if packet satisfies certain condition More...
 

Detailed Description

template<class Packet>
class ndn::security::conf::Rule< Packet >

Definition at line 36 of file rule.hpp.

Constructor & Destructor Documentation

◆ Rule()

template<class Packet >
ndn::security::conf::Rule< Packet >::Rule ( const std::string &  id)
inlineexplicit

Definition at line 40 of file rule.hpp.

◆ ~Rule()

template<class Packet >
virtual ndn::security::conf::Rule< Packet >::~Rule ( )
inlinevirtual

Definition at line 46 of file rule.hpp.

Member Function Documentation

◆ getId()

template<class Packet >
const std::string& ndn::security::conf::Rule< Packet >::getId ( )
inline

Definition at line 51 of file rule.hpp.

◆ addFilter()

template<class Packet >
void ndn::security::conf::Rule< Packet >::addFilter ( const shared_ptr< Filter > &  filter)
inline

Definition at line 57 of file rule.hpp.

◆ addChecker()

template<class Packet >
void ndn::security::conf::Rule< Packet >::addChecker ( const shared_ptr< Checker > &  checker)
inline

Definition at line 63 of file rule.hpp.

◆ match()

template<class Packet >
bool ndn::security::conf::Rule< Packet >::match ( const Packet &  packet)
inline

Definition at line 69 of file rule.hpp.

◆ check()

template<class Packet >
template<class ValidatedCallback , class ValidationFailureCallback >
int8_t ndn::security::conf::Rule< Packet >::check ( const Packet &  packet,
const ValidatedCallback &  onValidated,
const ValidationFailureCallback &  onValidationFailed 
)
inline

check if packet satisfies certain condition

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

Definition at line 96 of file rule.hpp.


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