NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
filter.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013-2017 Regents of the University of California.
4
*
5
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6
*
7
* ndn-cxx library is free software: you can redistribute it and/or modify it under the
8
* terms of the GNU Lesser General Public License as published by the Free Software
9
* Foundation, either version 3 of the License, or (at your option) any later version.
10
*
11
* ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
*
15
* You should have received copies of the GNU General Public License and GNU Lesser
16
* General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17
* <http://www.gnu.org/licenses/>.
18
*
19
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20
*/
21
22
#ifndef NDN_SECURITY_V2_VALIDATOR_CONFIG_FILTER_HPP
23
#define NDN_SECURITY_V2_VALIDATOR_CONFIG_FILTER_HPP
24
25
#include "
common.hpp
"
26
#include "
name-relation.hpp
"
27
#include "../../../interest.hpp"
28
#include "../../../data.hpp"
29
#include "../../../util/regex.hpp"
30
31
namespace
ndn
{
32
namespace
security
{
33
namespace
v2 {
34
namespace
validator_config {
35
43
class
Filter
: noncopyable
44
{
45
public
:
46
virtual
47
~Filter
() =
default
;
48
49
bool
50
match
(uint32_t pktType,
const
Name
& pktName);
51
52
public
:
60
static
unique_ptr<Filter>
61
create
(
const
ConfigSection
& configSection,
const
std::string& configFilename);
62
63
private
:
64
static
unique_ptr<Filter>
65
createNameFilter(
const
ConfigSection
& configSection,
const
std::string& configFilename);
66
67
private
:
68
virtual
bool
69
matchName(
const
Name
& pktName) = 0;
70
};
71
90
class
RelationNameFilter
:
public
Filter
91
{
92
public
:
93
RelationNameFilter
(
const
Name
&
name
,
NameRelation
relation);
94
95
private
:
96
bool
97
matchName(
const
Name
& pktName)
override
;
98
99
private
:
100
Name
m_name;
101
NameRelation
m_relation;
102
};
103
123
class
RegexNameFilter
:
public
Filter
124
{
125
public
:
126
explicit
127
RegexNameFilter
(
const
Regex
& regex);
128
129
private
:
130
bool
131
matchName(
const
Name
& pktName)
override
;
132
133
private
:
134
Regex
m_regex;
135
};
136
137
}
// namespace validator_config
138
}
// namespace v2
139
}
// namespace security
140
}
// namespace ndn
141
142
#endif // NDN_SECURITY_V2_VALIDATOR_CONFIG_FILTER_HPP
ndn::security::v2::validator_config::NameRelation
NameRelation
Definition:
name-relation.hpp:33
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::RegexTopMatcher
Definition:
regex-top-matcher.hpp:36
ndn::security::v2::validator_config::RegexNameFilter
Filter to check that packet name matches the specified regular expression.
Definition:
filter.hpp:123
ndn::security::v2::validator_config::Filter::~Filter
virtual ~Filter()=default
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
common.hpp
ndn::security::v2::validator_config::Filter::match
bool match(uint32_t pktType, const Name &pktName)
Definition:
filter.cpp:37
name-relation.hpp
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::v2::validator_config::Filter::create
static unique_ptr< Filter > create(const ConfigSection &configSection, const std::string &configFilename)
Create a filter from the configuration section.
Definition:
filter.cpp:76
ndn::security::v2::validator_config::ConfigSection
boost::property_tree::ptree ConfigSection
Definition:
common.hpp:35
ndn::security::v2::validator_config::RelationNameFilter
Check that name is in relation to the packet name.
Definition:
filter.hpp:90
ndn::security::v2::validator_config::Filter
Filter is one of the classes used by ValidatorConfig.
Definition:
filter.hpp:43
ndn::name
Definition:
name-component.cpp:37
ndnSIM
ndn-cxx
src
security
v2
validator-config
filter.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11