# Copyright(C) 2005 INL , http://inl.fr # Written by Jean Gillaux # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. from IPy import IP # Correspondance between protocols numbers PROTO_ICMP=1 PROTO_TCP=6 PROTO_UDP=17 ip_protocols = { PROTO_ICMP: 'icmp', PROTO_TCP: 'tcp', PROTO_UDP: 'udp', } ip_protocols_rev = { 'icmp': PROTO_ICMP, 'tcp': PROTO_TCP, 'udp': PROTO_UDP, } INTERNET = IP('0.0.0.0/0')