22 #ifndef NDN_CXX_SECURITY_VALIDATOR_CONFIG_RULE_HPP
23 #define NDN_CXX_SECURITY_VALIDATOR_CONFIG_RULE_HPP
30 class ValidationState;
32 namespace validator_config {
37 Rule(
const std::string&
id, uint32_t pktType);
71 match(uint32_t pktType,
const Name& pktName,
const shared_ptr<ValidationState>& state)
const;
90 const shared_ptr<ValidationState>& state)
const;
100 static unique_ptr<Rule>
106 std::vector<unique_ptr<Filter>> m_filters;
107 std::vector<unique_ptr<Checker>> m_checkers;
Represents an absolute name.
void addFilter(unique_ptr< Filter > filter)
bool check(uint32_t pktType, tlv::SignatureTypeValue sigType, const Name &pktName, const Name &klName, const shared_ptr< ValidationState > &state) const
Check if packet satisfies rule's condition.
uint32_t getPktType() const
static unique_ptr< Rule > create(const ConfigSection &configSection, const std::string &configFilename)
Create a rule from configuration section.
Rule(const std::string &id, uint32_t pktType)
void addChecker(unique_ptr< Checker > checker)
bool match(uint32_t pktType, const Name &pktName, const shared_ptr< ValidationState > &state) const
Check if the packet name matches rule's filter.
const std::string & getId() const
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
boost::property_tree::ptree ConfigSection
Contains the ndn-cxx security framework.
SignatureTypeValue
SignatureType values.