diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2006-12-24 00:08:46 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2006-12-24 00:08:46 +0000 |
| commit | 561e92d524df76ba58fd5cb562b3c87f2bede1b1 (patch) | |
| tree | 122f24fc42c544a8710fb58002315d2828ae01ca /sys/net | |
| parent | 53c9d997b5cf96913dee11a1004403af0dab0127 (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/ethernet.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 45986a42d880..f2893a50ae3b 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -61,14 +61,19 @@ struct ether_header { u_char ether_dhost[ETHER_ADDR_LEN]; u_char ether_shost[ETHER_ADDR_LEN]; u_short ether_type; -}; +} __packed; /* * Structure of a 48-bit Ethernet address. */ struct ether_addr { u_char octet[ETHER_ADDR_LEN]; -}; +} __packed; + +#ifdef CTASSERT +CTASSERT(sizeof (struct ether_header) == ETHER_ADDR_LEN * 2 + 2); +CTASSERT(sizeof (struct ether_addr) == ETHER_ADDR_LEN); +#endif #define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */ |
