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

#include <rule.hpp>

Collaboration diagram for ndn::security::conf::Rule< Packet >:

Public Types

typedef std::vector< shared_ptr< Checker > > CheckerList
 

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...
 

Public Attributes

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad0__: typedef std::vector<shared_ptr<Filter>> FilterList
 
std::string m_id
 
FilterList m_filters
 
CheckerList m_checkers
 

Detailed Description

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

Definition at line 37 of file rule.hpp.

Member Typedef Documentation

◆ CheckerList

template<class Packet >
typedef std::vector<shared_ptr<Checker> > ndn::security::conf::Rule< Packet >::CheckerList

Definition at line 122 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 41 of file rule.hpp.

◆ ~Rule()

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

Definition at line 47 of file rule.hpp.

Member Function Documentation

◆ getId()

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

Definition at line 52 of file rule.hpp.

References ndn::security::conf::Rule< Packet >::m_id.

◆ addFilter()

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

Definition at line 58 of file rule.hpp.

References ndn::security::conf::Rule< Packet >::m_filters.

◆ addChecker()

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

Definition at line 64 of file rule.hpp.

References ndn::security::conf::Rule< Packet >::m_checkers.

◆ match()

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

Definition at line 70 of file rule.hpp.

References ndn::security::conf::Rule< Packet >::m_filters.

◆ 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 97 of file rule.hpp.

References ndn::security::conf::Rule< Packet >::m_checkers, and NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE.

Member Data Documentation

◆ __pad0__

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

Definition at line 121 of file rule.hpp.

◆ m_id

template<class Packet >
std::string ndn::security::conf::Rule< Packet >::m_id

Definition at line 124 of file rule.hpp.

Referenced by ndn::security::conf::Rule< Packet >::getId().

◆ m_filters

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

◆ m_checkers

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

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