X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fb75d3cd5ad603bd255d9cdc20aeca674c6f3720..25d016f61a3b38e9c048090980c6921b30d047f3:/ether.h diff --git a/ether.h b/ether.h index c68f25c0..cd407db2 100644 --- a/ether.h +++ b/ether.h @@ -1,4 +1,3 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.4 2000-10-03 02:54:55 itojun Exp $ (LBL) */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -42,17 +41,18 @@ #define ETHER_ADDR_LEN 6 /* - * Ethernet address - 6 octets - */ -struct ether_addr { - u_int8_t ether_addr_octet[ETHER_ADDR_LEN]; -}; - -/* - * Structure of a 10Mb/s Ethernet header. + * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header. */ struct ether_header { u_int8_t ether_dhost[ETHER_ADDR_LEN]; u_int8_t ether_shost[ETHER_ADDR_LEN]; u_int16_t ether_type; }; + +/* + * Length of a DEC/Intel/Xerox or 802.3 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. + */ +#define ETHER_HDRLEN 14