1 /* 2 3 Firewall Builder 4 5 Copyright (C) 2002 NetCitadel, LLC 6 7 Author: Vadim Kurland vadim@vk.crocodile.org 8 9 $Id$ 10 11 This program is free software which we release under the GNU General Public 12 License. You may redistribute and/or modify this program under the terms 13 of that license as published by the Free Software Foundation; either 14 version 2 of the License, or (at your option) any later version. 15 16 This program is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License for more details. 20 21 To get a copy of the GNU General Public License, write to the Free Software 22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 24 */ 25 26 #ifndef __OSDATA_HH 27 #define __OSDATA_HH 28 29 #include "config.h" 30 31 #include <string> 32 #include <map> 33 #include <list> 34 35 class OSData { 36 37 std::string host_os; 38 std::map<int, std::string> variable_names; 39 std::map<int, std::string> attribute_names; 40 std::list<int> all_tools; 41 42 public: 43 44 OSData(const std::string &ho); 45 46 typedef enum { LSMOD, 47 MODPROBE, 48 IPTABLES, 49 IP6TABLES, 50 IPTABLES_RESTORE, 51 IP6TABLES_RESTORE, 52 IP, 53 IFCONFIG, 54 VCONFIG, 55 BRCTL, 56 IFENSLAVE, 57 IPSET, 58 LOGGER } tools; 59 getVariableName(tools t)60 std::string getVariableName(tools t) { return variable_names[t]; } getAllTools()61 const std::list<int>& getAllTools() { return all_tools; } getAttributeNameForTool(tools t)62 std::string getAttributeNameForTool(tools t) { return attribute_names[t]; } 63 }; 64 65 #endif 66