X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fipv4.h;h=7ad7e01be32a9c032e4f474f0cbf1f6c43c7722f;hb=5822f817aa802c2c5a83e9d99a8ae78cb822799b;hp=bd63ad04785e559c93eb18b53ed6fc0482ff3643;hpb=1d9dacb1f26971e19463b5501c2410c57f780ecb;p=tinc diff --git a/src/ipv4.h b/src/ipv4.h index bd63ad04..7ad7e01b 100644 --- a/src/ipv4.h +++ b/src/ipv4.h @@ -1,3 +1,6 @@ +#ifndef TINC_IPV4_H +#define TINC_IPV4_H + /* ipv4.h -- missing IPv4 related definitions Copyright (C) 2005 Ivo Timmermans @@ -18,9 +21,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_IPV4_H__ -#define __TINC_IPV4_H__ - #ifndef AF_INET #define AF_INET 2 #endif @@ -72,7 +72,7 @@ struct ip { #endif uint8_t ip_tos; uint16_t ip_len; - uint16_t ip_id; + uint16_t ip_id; uint16_t ip_off; #define IP_RF 0x8000 #define IP_DF 0x4000 @@ -81,7 +81,7 @@ struct ip { uint8_t ip_p; uint16_t ip_sum; struct in_addr ip_src, ip_dst; -} __attribute__ ((__packed__)); +} __attribute__ ((__gcc_struct__, __packed__)); #endif #ifndef IP_OFFMASK @@ -143,7 +143,7 @@ struct icmp { #define icmp_radv icmp_dun.id_radv #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data -} __attribute__ ((__packed__)); +} __attribute__ ((__gcc_struct__, __packed__)); #endif -#endif /* __TINC_IPV4_H__ */ +#endif