diff options
Diffstat (limited to 'contrib/tcpdump/print-arp.c')
-rw-r--r-- | contrib/tcpdump/print-arp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/tcpdump/print-arp.c b/contrib/tcpdump/print-arp.c index 20534ed..a3aec16 100644 --- a/contrib/tcpdump/print-arp.c +++ b/contrib/tcpdump/print-arp.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.51 2001/09/17 21:57:54 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.51.4.2 2002/07/10 07:09:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -54,7 +54,7 @@ static const char rcsid[] = * arp_tha and arp_tpa in that order, according to the lengths * specified. Field names used correspond to RFC 826. */ -struct arphdr { +struct arp_pkthdr { u_short ar_hrd; /* format of hardware address */ #define ARPHRD_ETHER 1 /* ethernet hardware format */ #define ARPHRD_IEEE802 6 /* token-ring hardware format */ @@ -82,10 +82,10 @@ struct arphdr { u_char ar_tha[]; /* target hardware address */ u_char ar_tpa[]; /* target protocol address */ #endif -#define ar_sha(ap) (((const caddr_t)((ap)+1))+0) -#define ar_spa(ap) (((const caddr_t)((ap)+1))+ (ap)->ar_hln) -#define ar_tha(ap) (((const caddr_t)((ap)+1))+ (ap)->ar_hln+(ap)->ar_pln) -#define ar_tpa(ap) (((const caddr_t)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln) +#define ar_sha(ap) (((const u_char *)((ap)+1))+0) +#define ar_spa(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln) +#define ar_tha(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln+(ap)->ar_pln) +#define ar_tpa(ap) (((const u_char *)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln) }; #define ARP_HDRLEN 8 @@ -105,10 +105,10 @@ static u_char ezero[6]; void arp_print(const u_char *bp, u_int length, u_int caplen) { - const struct arphdr *ap; + const struct arp_pkthdr *ap; u_short pro, hrd, op; - ap = (const struct arphdr *)bp; + ap = (const struct arp_pkthdr *)bp; TCHECK(*ap); if ((const u_char *)(ar_tpa(ap) + PLN(ap)) > snapend) { (void)printf("truncated-arp"); |