]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Call the ARP header structure we define "struct arp_pkthdr" rather than
authorguy <guy>
Mon, 25 Feb 2002 09:40:32 +0000 (09:40 +0000)
committerguy <guy>
Mon, 25 Feb 2002 09:40:32 +0000 (09:40 +0000)
"struct arphdr"; on Tru64 UNIX 5.x, including <netinet/in.h> causes
<net/if_arp.h> to be included, and that defines its own "struct arphdr",
causing the compile to fail.

print-arp.c

index a9e3a990b5361268fbfe350d54dc5f726e8c3902..240ca22aaf36135d0982c9652afef92a21578e61 100644 (file)
@@ -21,7 +21,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.52 2002-02-25 09:40:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -52,7 +52,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 */
@@ -103,10 +103,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");