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 #ifndef INSPECTION_CLASS_MAP_HH 25 #define INSPECTION_CLASS_MAP_HH 26 27 28 #include <string> 29 30 /* 31 * status: 32 * 0: enable 33 * 1: disable 34 * 2: skip 35 */ 36 class InspectionClassMap { 37 38 public: 39 40 std::string class_map_name; 41 std::string fixup_name; 42 std::string inspect_name; 43 int status; 44 int port1,port2; 45 std::string arg_name; 46 int arg_val; 47 InspectionClassMap(const std::string & fn,int s,int p1,int p2,const std::string & a,int v)48 InspectionClassMap(const std::string &fn,int s,int p1,int p2, 49 const std::string &a,int v) 50 { 51 status=s; port1=p1; port2=p2; arg_name=a; arg_val=v; 52 std::string ss = fn; 53 std::string::size_type k; 54 while ( (k=ss.find(" ")) != std::string::npos ) 55 ss.replace(k,1,1,'_'); 56 inspect_name = ss; 57 fixup_name = fn; 58 class_map_name = std::string("custom_") + ss + std::string("_inspection"); 59 } 60 61 bool isDefault(); 62 std::string getIPProtocol(); 63 std::string getPrintableName(); 64 std::string getMatchCommand(); 65 }; 66 67 #endif 68