]> The Tcpdump Group git mirrors - tcpdump/blobdiff - ether.h
Don't do IPv6 stuff if INET6 isn't defined.
[tcpdump] / ether.h
diff --git a/ether.h b/ether.h
index 44081680ca4189d50c772c934a0ea6d836873bdf..58b92de52a030d506bb37ede49427c8452ef9e25 100644 (file)
--- a/ether.h
+++ b/ether.h
  *     @(#)if_ether.h  8.3 (Berkeley) 5/2/95
  */
 
-#if 0
-#include <net/if_arp.h>
-#endif
-
 #define        ETHERMTU        1500
 
 /*
 #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 {
+       uint8_t         ether_dhost[ETHER_ADDR_LEN];
+       uint8_t         ether_shost[ETHER_ADDR_LEN];
+       uint16_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