]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nfs.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-nfs.c
index a83f1b541885efaa7f98ce1be92947e72e16b80f..c90eadbd2fa03fbc69af0b667332439e218ad19a 100644 (file)
@@ -198,7 +198,7 @@ static const struct tok sunrpc_str[] = {
 };
 
 static void
-print_nfsaddr(netdissect_options *ndo,
+nfsaddr_print(netdissect_options *ndo,
               const u_char *bp, const char *s, const char *d)
 {
        const struct ip *ip;
@@ -340,7 +340,6 @@ nfsreply_print(netdissect_options *ndo,
        ndo->ndo_protocol = "nfs";
        rp = (const struct sunrpc_msg *)bp;
 
-       ND_TCHECK_4(rp->rm_xid);
        if (!ndo->ndo_nflag) {
                strlcpy(srcid, "nfs", sizeof(srcid));
                snprintf(dstid, sizeof(dstid), "%u",
@@ -350,13 +349,9 @@ nfsreply_print(netdissect_options *ndo,
                snprintf(dstid, sizeof(dstid), "%u",
                    GET_BE_U_4(rp->rm_xid));
        }
-       print_nfsaddr(ndo, bp2, srcid, dstid);
+       nfsaddr_print(ndo, bp2, srcid, dstid);
 
        nfsreply_noaddr_print(ndo, bp, length, bp2);
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }
 
 void
@@ -911,7 +906,7 @@ nfs_printfh(netdissect_options *ndo,
                /* Print the undecoded handle */
                ND_PRINT("%s", fsid.Opaque_Handle);
        else
-               ND_PRINT("%ld", (long) ino);
+               ND_PRINT("%u", ino);
 }
 
 /*
@@ -1317,15 +1312,12 @@ parserddires(netdissect_options *ndo,
        if (ndo->ndo_qflag)
                return (1);
 
-       ND_TCHECK_4(dp + 2);
        ND_PRINT(" offset 0x%x size %u ",
               GET_BE_U_4(dp), GET_BE_U_4(dp + 1));
        if (GET_BE_U_4(dp + 2) != 0)
                ND_PRINT(" eof");
 
        return (1);
-trunc:
-       return (0);
 }
 
 static const uint32_t *