]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nfs.c
When discussing the "gateway" keyword, don't say that the host must be
[tcpdump] / print-nfs.c
index 02421b65fd87b34fe16e3e607ffcb3bdf7b062c9..d195ec759a2d3e7026a6f129a4e094009fd93073 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.83 2000-09-23 08:54:35 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.87 2000-10-07 05:53:12 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -34,13 +34,8 @@ static const char rcsid[] =
 
 struct mbuf;
 struct rtentry;
-#include <net/if.h>
 
 #include <netinet/in.h>
-#include <netinet/in_systm.h>
-#ifdef INET6
-#include <netinet/ip6.h>
-#endif
 
 #include <rpc/rpc.h>
 
@@ -56,6 +51,9 @@ struct rtentry;
 #include "nfsfh.h"
 
 #include "ip.h"
+#ifdef INET6
+#include "ip6.h"
+#endif
 
 static void nfs_printfh(const u_int32_t *, const u_int);
 static void xid_map_enter(const struct rpc_msg *, const u_char *);
@@ -228,7 +226,7 @@ print_nfsaddr(const u_char *bp, const char *s, const char *d)
 #endif
 
        srcaddr[0] = dstaddr[0] = '\0';
-       switch (((struct ip *)bp)->ip_v) {
+       switch (IP_V((struct ip *)bp)) {
        case 4:
                ip = (struct ip *)bp;
                strlcpy(srcaddr, ipaddr_string(&ip->ip_src), sizeof(srcaddr));
@@ -829,7 +827,7 @@ xid_map_enter(const struct rpc_msg *rp, const u_char *bp)
 #endif
        struct xid_map_entry *xmep;
 
-       switch (((struct ip *)bp)->ip_v) {
+       switch (IP_V((struct ip *)bp)) {
        case 4:
                ip = (struct ip *)bp;
                break;
@@ -886,7 +884,7 @@ xid_map_find(const struct rpc_msg *rp, const u_char *bp, u_int32_t *proc,
        do {
                xmep = &xid_map[i];
                cmp = 1;
-               if (xmep->ipver != ip->ip_v || xmep->xid != xid)
+               if (xmep->ipver != IP_V(ip) || xmep->xid != xid)
                        goto nextitem;
                switch (xmep->ipver) {
                case 4: