-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.5 2000-10-09 02:59:39 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.6 2000-10-09 03:24:24 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
- */
-struct ether_addr {
- u_int8_t ether_addr_octet[ETHER_ADDR_LEN];
-};
-
/*
* Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.47 2000-09-24 07:42:31 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.48 2000-10-09 03:24:25 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#endif
};
+#define ARP_HDRLEN 8
+
/*
* Ethernet Address Resolution Protocol.
*
#define arp_pln ea_hdr.ar_pln
#define arp_op ea_hdr.ar_op
+#define ETHER_ARP_HDRLEN (ARP_HDRLEN + 6 + 4 + 6 + 4)
+
#define SHA(ap) ((ap)->arp_sha)
#define THA(ap) ((ap)->arp_tha)
#define SPA(ap) ((ap)->arp_spa)
printf("[|arp]");
return;
}
- if (length < sizeof(struct ether_arp)) {
+ if (length < ETHER_ARP_HDRLEN) {
(void)printf("truncated-arp");
default_print((u_char *)ap, length);
return;