-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.3 2000-09-23 08:54:25 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
#define ETHER_ADDR_LEN 6
/*
- * Ethernet address - 6 octets
+ * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
*/
-struct ether_addr {
- u_char ether_addr_octet[ETHER_ADDR_LEN];
+struct ether_header {
+ u_int8_t ether_dhost[ETHER_ADDR_LEN];
+ u_int8_t ether_shost[ETHER_ADDR_LEN];
+ u_int16_t ether_type;
};
/*
- * Structure of a 10Mb/s Ethernet header.
+ * 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.
*/
-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