X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e89409254248af64db721ede4babbe9fd1753f6c..1cfd6cd2ac8acecbcf16e083a6cd272a19ec994e:/ether.h diff --git a/ether.h b/ether.h index 44081680..64916789 100644 --- a/ether.h +++ b/ether.h @@ -33,10 +33,6 @@ * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 */ -#if 0 -#include -#endif - #define ETHERMTU 1500 /* @@ -45,17 +41,17 @@ #define ETHER_ADDR_LEN 6 /* - * Ethernet address - 6 octets + * Structure of an Ethernet header. */ -struct ether_addr { - u_char ether_addr_octet[ETHER_ADDR_LEN]; +struct ether_header { + uint8_t ether_dhost[ETHER_ADDR_LEN]; + uint8_t ether_shost[ETHER_ADDR_LEN]; + uint16_t ether_length_type; }; /* - * Structure of a 10Mb/s Ethernet header. + * Length of an Ethernet header; note that some compilers may pad + * "struct ether_header" to a multiple of 4 bytes, for example, so + * "sizeof (struct ether_header)" may not give the right answer. */ -struct ether_header { - u_char ether_dhost[ETHER_ADDR_LEN]; - u_char ether_shost[ETHER_ADDR_LEN]; - u_short ether_type; -}; +#define ETHER_HDRLEN 14