X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fethernet.h;h=ddb0a7c676a10785c5c8b5e18432c1d21b79c678;hb=0530bf8704f92e9741d969d6576bf8e2bbf026be;hp=4ef9dab935b64ab4306d8586b90f70347ed9c7de;hpb=33f0918cde36accb606271c379bc8e75973e9d59;p=tinc diff --git a/src/ethernet.h b/src/ethernet.h index 4ef9dab9..ddb0a7c6 100644 --- a/src/ethernet.h +++ b/src/ethernet.h @@ -68,6 +68,8 @@ struct ether_header { }; #endif +STATIC_ASSERT(sizeof(struct ether_header) == 14, "ether_header has incorrect size"); + #ifndef HAVE_STRUCT_ARPHDR struct arphdr { uint16_t ar_hrd; @@ -86,6 +88,8 @@ struct arphdr { #define ARPOP_NAK 10 #endif +STATIC_ASSERT(sizeof(struct arphdr) == 8, "arphdr has incorrect size"); + #ifndef HAVE_STRUCT_ETHER_ARP struct ether_arp { struct arphdr ea_hdr; @@ -101,4 +105,6 @@ struct ether_arp { #define arp_op ea_hdr.ar_op #endif +STATIC_ASSERT(sizeof(struct ether_arp) == 28, "ether_arp has incorrect size"); + #endif