]> The Tcpdump Group git mirrors - tcpdump/blobdiff - linux-include/netinet/if_ether.h
- Print the IP source and destination if the TCP header is truncated before
[tcpdump] / linux-include / netinet / if_ether.h
index 4148ab83ea49d621f22c3f95751a0297ad38fa66..98545adc6576d9a1f1f634aeae452c744b27ef45 100644 (file)
 
 #include <net/if_arp.h>
 
 
 #include <net/if_arp.h>
 
+/*
+ * The number of bytes in an ethernet (MAC) address.
+ */
+#define        ETHER_ADDR_LEN          6
+
 /*
  * Ethernet address - 6 octets
  */
 struct ether_addr {
 /*
  * Ethernet address - 6 octets
  */
 struct ether_addr {
-       u_char  ether_addr_octet[6];
+       u_char  ether_addr_octet[ETHER_ADDR_LEN];
 };
 
 /*
  * Structure of a 10Mb/s Ethernet header.
  */
 struct ether_header {
 };
 
 /*
  * Structure of a 10Mb/s Ethernet header.
  */
 struct ether_header {
-       u_char  ether_dhost[6];
-       u_char  ether_shost[6];
+       u_char  ether_dhost[ETHER_ADDR_LEN];
+       u_char  ether_shost[ETHER_ADDR_LEN];
        u_short ether_type;
 };
 
        u_short ether_type;
 };