NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
sec-rule.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_HPP
25
#define NDN_SECURITY_SEC_RULE_HPP
26
27
#include "../common.hpp"
28
#include "../data.hpp"
29
30
namespace
ndn
{
31
32
class
SecRule
33
{
34
public
:
35
class
Error
:
public
std::runtime_error
36
{
37
public
:
38
explicit
39
Error
(
const
std::string& what)
40
:
std
::runtime_error(what)
41
{
42
}
43
};
44
45
explicit
46
SecRule
(
bool
isPositive
)
47
:
m_isPositive
(
isPositive
)
48
{
49
}
50
51
virtual
52
~SecRule
()
53
{
54
}
55
56
virtual
bool
57
matchDataName
(
const
Data
& data) = 0;
58
59
virtual
bool
60
matchSignerName
(
const
Data
& data) = 0;
61
62
virtual
bool
63
satisfy
(
const
Data
& data) = 0;
64
65
virtual
bool
66
satisfy
(
const
Name
& dataName,
const
Name
& signerName) = 0;
67
68
inline
bool
69
isPositive
();
70
71
protected
:
72
bool
m_isPositive
;
73
};
74
75
bool
76
SecRule::isPositive
()
77
{
78
return
m_isPositive
;
79
}
80
81
}
// namespace ndn
82
83
#endif //NDN_SECURITY_SEC_RULE_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::SecRule::isPositive
bool isPositive()
Definition:
sec-rule.hpp:76
ndn::SecRule::SecRule
SecRule(bool isPositive)
Definition:
sec-rule.hpp:46
std
STL namespace.
ndn::SecRule::m_isPositive
bool m_isPositive
Definition:
sec-rule.hpp:72
ndn::SecRule::~SecRule
virtual ~SecRule()
Definition:
sec-rule.hpp:52
ndn::SecRule::satisfy
virtual bool satisfy(const Data &data)=0
ndn::SecRule::Error
Definition:
sec-rule.hpp:35
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::SecRule::Error::Error
Error(const std::string &what)
Definition:
sec-rule.hpp:39
ndn::SecRule::matchDataName
virtual bool matchDataName(const Data &data)=0
ndn::SecRule::matchSignerName
virtual bool matchSignerName(const Data &data)=0
ndn::Data
represents a Data packet
Definition:
data.hpp:39
ndn::SecRule
Definition:
sec-rule.hpp:32
ndnSIM
ndn-cxx
src
security
sec-rule.hpp
Generated on Fri Feb 23 2018 12:30:55 for ndnSIM by
1.8.14