X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Fipv4.h;h=57d236d33115f901ce2087834917b4214bf42826;hp=dcac0bf8be61180be87a3a6591a3e2afc657a926;hb=65e8e06c6dc7349b11c3c1e8f4071b51e2994c65;hpb=2c7ce7de12d16cb407fd40224b6cb802528ee942 diff --git a/lib/ipv4.h b/lib/ipv4.h index dcac0bf8..57d236d3 100644 --- a/lib/ipv4.h +++ b/lib/ipv4.h @@ -1,7 +1,7 @@ /* ipv4.h -- missing IPv4 related definitions - Copyright (C) 2003 Ivo Timmermans - 2003 Guus Sliepen + Copyright (C) 2005 Ivo Timmermans + 2006 Guus Sliepen 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 @@ -13,11 +13,9 @@ 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, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: ipv4.h,v 1.1.2.5 2003/12/22 11:05:23 guus Exp $ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_IPV4_H__ @@ -43,10 +41,22 @@ #define ICMP_NET_UNKNOWN 6 #endif +#ifndef ICMP_TIME_EXCEEDED +#define ICMP_TIME_EXCEEDED 11 +#endif + +#ifndef ICMP_EXC_TTL +#define ICMP_EXC_TTL 0 +#endif + #ifndef ICMP_NET_UNREACH #define ICMP_NET_UNREACH 0 #endif +#ifndef ICMP_NET_ANO +#define ICMP_NET_ANO 9 +#endif + #ifndef IP_MSS #define IP_MSS 576 #endif @@ -67,7 +77,6 @@ struct ip { #define IP_RF 0x8000 #define IP_DF 0x4000 #define IP_MF 0x2000 -#define IP_OFFMASK 0x1fff uint8_t ip_ttl; uint8_t ip_p; uint16_t ip_sum; @@ -75,6 +84,10 @@ struct ip { } __attribute__ ((__packed__)); #endif +#ifndef IP_OFFMASK +#define IP_OFFMASK 0x1fff +#endif + #ifndef HAVE_STRUCT_ICMP struct icmp { uint8_t icmp_type;