IBR-DTN  1.0.0
SecurityFilter.h
Go to the documentation of this file.
1 /*
2  * SecurityFilter.h
3  *
4  * Copyright (C) 2014 IBR, TU Braunschweig
5  *
6  * Written-by: Johannes Morgenroth <jm@m-network.de>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 
22 #include "core/BundleFilter.h"
23 
24 #ifndef FILTER_SECURITYFILTER_H_
25 #define FILTER_SECURITYFILTER_H_
26 
27 namespace dtn
28 {
29  namespace core
30  {
31  class SecurityFilter : public BundleFilter {
32  public:
33  enum MODE {
41  };
42 
44  virtual ~SecurityFilter();
45 
46  virtual ACTION evaluate(const FilterContext&) const throw ();
47  virtual ACTION filter(const FilterContext&, dtn::data::Bundle&) const throw ();
48 
49  private:
50  const MODE _mode;
51  const BundleFilter::ACTION _positive_action;
52  const BundleFilter::ACTION _negative_action;
53  };
54  } /* namespace core */
55 } /* namespace dtn */
56 
57 #endif /* FILTER_SECURITYFILTER_H_ */
virtual ACTION evaluate(const FilterContext &) const
virtual ACTION filter(const FilterContext &, dtn::data::Bundle &) const
SecurityFilter(MODE mode, BundleFilter::ACTION positive=BundleFilter::PASS, BundleFilter::ACTION negative=BundleFilter::PASS)