1 /*
2 
3                           Firewall Builder
4 
5                  Copyright (C) 2002-2011 NetCitadel, LLC
6 
7   Author:  Vadim Kurland     vadim@fwbuilder.org
8 
9   This program is free software which we release under the GNU General Public
10   License. You may redistribute and/or modify this program under the terms
11   of that license as published by the Free Software Foundation; either
12   version 2 of the License, or (at your option) any later version.
13 
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18 
19   To get a copy of the GNU General Public License, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 
22 */
23 
24 
25 #ifndef __SPECIALSERVICES_HH
26 #define __SPECIALSERVICES_HH
27 
28 #include "fwbuilder/RuleElement.h"
29 #include "fwcompiler/RuleProcessor.h"
30 
31 namespace libfwbuilder {
32     class Address;
33     class Rule;
34 };
35 
36 namespace fwcompiler
37 {
38 
39     /**
40      * this processor checks for the services which require
41      * special treatment.  Some of these will be checking for
42      * source or destination object as well because special
43      * command may need to be generated in case source or
44      * destination is a firewall itself. Therefore this processor
45      * should be called after converting to atomic rules, but
46      * before interface addresses in source and destination are
47      * expanded.
48      */
49     class SpecialServices : public BasicRuleProcessor
50     {
51         std::string re_type;
52 public:
SpecialServices(const std::string & name,const std::string & _type)53         SpecialServices(const std::string &name, const std::string &_type) :
54             BasicRuleProcessor(name) {re_type=_type; }
55         virtual bool processNext();
56     };
57 }
58 
59 #endif
60