51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "system.h"
+
#ifndef AF_INET
#define AF_INET 2
#endif
#ifndef HAVE_STRUCT_IP
struct ip {
#if __BYTE_ORDER == __LITTLE_ENDIAN
- unsigned int ip_hl:4;
- unsigned int ip_v:4;
+ unsigned int ip_hl: 4;
+ unsigned int ip_v: 4;
#else
- unsigned int ip_v:4;
- unsigned int ip_hl:4;
+ unsigned int ip_v: 4;
+ unsigned int ip_hl: 4;
#endif
uint8_t ip_tos;
uint16_t ip_len;
uint8_t ip_p;
uint16_t ip_sum;
struct in_addr ip_src, ip_dst;
-} __attribute__ ((__gcc_struct__, __packed__));
+};
#endif
+STATIC_ASSERT(sizeof(struct ip) == 20, "ip has incorrect size");
+
#ifndef IP_OFFMASK
#define IP_OFFMASK 0x1fff
#endif
#define icmp_radv icmp_dun.id_radv
#define icmp_mask icmp_dun.id_mask
#define icmp_data icmp_dun.id_data
-} __attribute__ ((__gcc_struct__, __packed__));
+};
#endif
+STATIC_ASSERT(sizeof(struct icmp) == 28, "icmp has incorrect size");
+
#endif