aboutsummaryrefslogtreecommitdiff
path: root/print-nfs.c
diff options
context:
space:
mode:
authorViral Mehta <viral.mehta@dell.com>2018-08-23 00:09:14 -0400
committerDenis Ovsienko <denis@ovsienko.info>2018-09-05 10:55:08 +0100
commit955e4a763bfb9d55f80a8ab8a371651da8f7a4f4 (patch)
tree40728a08bb9d7850fa0164d870dc016fdff8d63c /print-nfs.c
parente12bc85871f1152478fca4e6f023db9e0f58a33f (diff)
downloadtcpdump-955e4a763bfb9d55f80a8ab8a371651da8f7a4f4.tar.gz
print verifier cookie for write and commit operation
Diffstat (limited to 'print-nfs.c')
-rw-r--r--print-nfs.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/print-nfs.c b/print-nfs.c
index 92c87fc4..2a45edf8 100644
--- a/print-nfs.c
+++ b/print-nfs.c
@@ -1435,7 +1435,7 @@ trunc:
return (NULL);
}
-static int
+static const uint32_t *
parsewccres(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
@@ -1443,7 +1443,7 @@ parsewccres(netdissect_options *ndo,
if (!(dp = parsestatus(ndo, dp, &er)))
return (0);
- return parse_wcc_data(ndo, dp, verbose) != NULL;
+ return parse_wcc_data(ndo, dp, verbose);
}
static const uint32_t *
@@ -1668,6 +1668,10 @@ interp_reply(netdissect_options *ndo,
ND_PRINT(" <%s>",
tok2str(nfsv3_writemodes,
NULL, EXTRACT_BE_U_4(dp + 1)));
+
+ /* write-verf-cookie */
+ ND_TCHECK_8(dp + 2);
+ ND_PRINT(" verf %" PRIx64, EXTRACT_BE_U_8(dp + 2));
}
return;
}
@@ -1803,8 +1807,14 @@ interp_reply(netdissect_options *ndo,
case NFSPROC_COMMIT:
dp = parserep(ndo, rp, length);
- if (dp != NULL && parsewccres(ndo, dp, ndo->ndo_vflag) != 0)
+ if (dp != NULL && (dp = parsewccres(ndo, dp, ndo->ndo_vflag)) != 0) {
+ if (ndo->ndo_vflag > 1) {
+ /* write-verf-cookie */
+ ND_TCHECK_8(dp);
+ ND_PRINT(" verf %" PRIx64, EXTRACT_BE_U_8(dp));
+ }
return;
+ }
break;
default: