1 /* 2 3 Firewall Builder 4 5 Copyright (C) 2008 NetCitadel, LLC 6 7 Author: Vadim Kurland vadim@fwbuilder.org 8 9 $Id$ 10 11 12 This program is free software which we release under the GNU General Public 13 License. You may redistribute and/or modify this program under the terms 14 of that license as published by the Free Software Foundation; either 15 version 2 of the License, or (at your option) any later version. 16 17 This program is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 GNU General Public License for more details. 21 22 To get a copy of the GNU General Public License, write to the Free Software 23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 25 */ 26 27 /* 28 * This class is a holder of a pair address / netmask. 29 * It can act both as a container for the address/netmask configuration 30 * data (such as for an interface) or as a network. 31 * 32 */ 33 34 #ifndef __INET6ADDRMASK_HH_FLAG__ 35 #define __INET6ADDRMASK_HH_FLAG__ 36 37 #include <string> 38 #include <vector> 39 40 #ifndef _WIN32 41 # include <sys/types.h> 42 # include <sys/socket.h> 43 # include <netinet/in.h> 44 # include <arpa/inet.h> 45 #else 46 # include <winsock2.h> 47 #endif 48 49 #include "fwbuilder/FWException.h" 50 #include "fwbuilder/InetAddrMask.h" 51 52 namespace libfwbuilder 53 { 54 55 class Inet6AddrMask : public InetAddrMask 56 { 57 protected: 58 59 public: 60 61 Inet6AddrMask(); 62 Inet6AddrMask(const std::string &s) throw(FWException); 63 Inet6AddrMask(const InetAddr&, const InetAddr&); 64 virtual ~Inet6AddrMask(); 65 66 virtual std::string toString() const; 67 }; 68 69 } 70 71 #endif 72 73