]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sunrpc.c
The stuff in the "linux-include" directory is no longer needed, as we no
[tcpdump] / print-sunrpc.c
index d9667a2b53b367e51aeb3b8aff673958030e4ecd..54e32d86d290555a0b4f99afd20640961061691f 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.33 2000-07-01 03:39:10 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.39 2000-10-07 05:53:13 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -34,16 +34,8 @@ static const char rcsid[] =
 
 struct mbuf;
 struct rtentry;
-#include <net/if.h>
 
 #include <netinet/in.h>
-#include <netinet/if_ether.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#ifdef INET6
-#include <netinet/ip6.h>
-#endif
 
 #include <rpc/rpc.h>
 #ifdef HAVE_RPC_RPCENT_H
@@ -59,6 +51,11 @@ struct rtentry;
 #include "interface.h"
 #include "addrtoname.h"
 
+#include "ip.h"
+#ifdef INET6
+#include "ip6.h"
+#endif
+
 static struct tok proc2str[] = {
        { PMAPPROC_NULL,        "null" },
        { PMAPPROC_SET,         "set" },
@@ -96,7 +93,7 @@ sunrpcrequest_print(register const u_char *bp, register u_int length,
                snprintf(dstid, sizeof(dstid), "0x%x", PMAPPORT);
        }
 
-       switch (((struct ip *)bp2)->ip_v) {
+       switch (IP_V((struct ip *)bp2)) {
        case 4:
                ip = (struct ip *)bp2;
                printf("%s.%s > %s.%s: %d",