22 #ifndef NDN_CXX_SECURITY_VALIDATOR_CONFIG_RULE_HPP
23 #define NDN_CXX_SECURITY_VALIDATOR_CONFIG_RULE_HPP
32 class ValidationState;
34 namespace validator_config {
39 Rule(
const std::string&
id, uint32_t pktType);
73 match(uint32_t pktType,
const Name& pktName,
const shared_ptr<ValidationState>& state)
const;
92 const shared_ptr<ValidationState>& state)
const;
102 static unique_ptr<Rule>
108 std::vector<unique_ptr<Filter>> m_filters;
109 std::vector<unique_ptr<Checker>> m_checkers;
Represents an absolute name.
void addChecker(unique_ptr< Checker > checker)
const std::string & getId() const
uint32_t getPktType() const
static unique_ptr< Rule > create(const ConfigSection &configSection, const std::string &configFilename)
Create a rule from configuration section.
bool match(uint32_t pktType, const Name &pktName, const shared_ptr< ValidationState > &state) const
Check if the packet name matches rule's filter.
Rule(const std::string &id, uint32_t pktType)
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.
void addFilter(unique_ptr< Filter > filter)
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
boost::property_tree::ptree ConfigSection
SignatureTypeValue
SignatureType values.