NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
sec-rule-specific.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24 #ifndef NDN_SECURITY_SEC_RULE_SPECIFIC_H
25 #define NDN_SECURITY_SEC_RULE_SPECIFIC_H
26 
27 #include "../common.hpp"
28 #include "sec-rule.hpp"
29 #include "../util/regex.hpp"
30 
31 namespace ndn {
32 
33 class SecRuleSpecific : public SecRule
34 {
35 
36 public:
37  SecRuleSpecific(shared_ptr<Regex> dataRegex,
38  shared_ptr<Regex> signerRegex);
39 
40  explicit
41  SecRuleSpecific(shared_ptr<Regex> dataRegex);
42 
43  explicit
44  SecRuleSpecific(const SecRuleSpecific& rule);
45 
46  virtual
48 
49  bool
50  matchDataName(const Data& data);
51 
52  bool
53  matchSignerName(const Data& data);
54 
55  bool
56  satisfy(const Data& data);
57 
58  bool
59  satisfy(const Name& dataName, const Name& signerName);
60 
61  bool
62  isExempted() const
63  {
64  return m_isExempted;
65  }
66 
67 private:
68  shared_ptr<Regex> m_dataRegex;
69  shared_ptr<Regex> m_signerRegex;
70  bool m_isExempted;
71 };
72 
73 } // namespace ndn
74 
75 #endif //NDN_SECURITY_SEC_RULE_SPECIFIC_H
Copyright (c) 2011-2015 Regents of the University of California.
bool matchDataName(const Data &data)
bool matchSignerName(const Data &data)
Name abstraction to represent an absolute name.
Definition: name.hpp:46
SecRuleSpecific(shared_ptr< Regex > dataRegex, shared_ptr< Regex > signerRegex)
represents a Data packet
Definition: data.hpp:39
bool satisfy(const Data &data)