parse_sattr3(netdissect_options *ndo,
const uint32_t *dp, struct nfsv3_sattr *sa3)
{
parse_sattr3(netdissect_options *ndo,
const uint32_t *dp, struct nfsv3_sattr *sa3)
{
if (!ndo->ndo_nflag) {
strlcpy(srcid, "nfs", sizeof(srcid));
snprintf(dstid, sizeof(dstid), "%u",
if (!ndo->ndo_nflag) {
strlcpy(srcid, "nfs", sizeof(srcid));
snprintf(dstid, sizeof(dstid), "%u",
snprintf(dstid, sizeof(dstid), "%u",
GET_BE_U_4(rp->rm_xid));
}
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);
nfsreply_noaddr_print(ndo, bp, length, bp2);
rounded_len = roundup2(len, 4);
ND_TCHECK_LEN(dp + 2, rounded_len);
if (2 * sizeof(*dp) + rounded_len <= length) {
rounded_len = roundup2(len, 4);
ND_TCHECK_LEN(dp + 2, rounded_len);
if (2 * sizeof(*dp) + rounded_len <= length) {
rounded_len = roundup2(len, 4);
ND_TCHECK_LEN(dp + 2, rounded_len);
if (2 * sizeof(*dp) + rounded_len < length) {
rounded_len = roundup2(len, 4);
ND_TCHECK_LEN(dp + 2, rounded_len);
if (2 * sizeof(*dp) + rounded_len < length) {
if (ND_TTEST_LEN(dp, len * sizeof(*dp))) {
nfs_printfh(ndo, dp, len);
return (dp + len);
if (ND_TTEST_LEN(dp, len * sizeof(*dp))) {
nfs_printfh(ndo, dp, len);
return (dp + len);
access_flags = GET_BE_U_4(dp);
if (access_flags & ~NFSV3ACCESS_FULL) {
/* NFSV3ACCESS definitions aren't up to date */
access_flags = GET_BE_U_4(dp);
if (access_flags & ~NFSV3ACCESS_FULL) {
/* NFSV3ACCESS definitions aren't up to date */
type = (nfs_type) GET_BE_U_4(dp);
dp++;
dp = parse_sattr3(ndo, dp, &sa3);
type = (nfs_type) GET_BE_U_4(dp);
dp++;
dp = parse_sattr3(ndo, dp, &sa3);
goto trunc;
ND_PRINT(" %s", tok2str(type2str, "unk-ft %u", type));
if (ndo->ndo_vflag && (type == NFCHR || type == NFBLK)) {
goto trunc;
ND_PRINT(" %s", tok2str(type2str, "unk-ft %u", type));
if (ndo->ndo_vflag && (type == NFCHR || type == NFBLK)) {
/*
* Print the offset as signed, since -1 is
* common, but offsets > 2^31 aren't.
/*
* Print the offset as signed, since -1 is
* common, but offsets > 2^31 aren't.
/*
* This displays the 8 bytes
* of the verifier in order,
/*
* This displays the 8 bytes
* of the verifier in order,
astat = (enum sunrpc_accept_stat) GET_BE_U_4(dp);
if (astat != SUNRPC_SUCCESS) {
ND_PRINT(" %s", tok2str(sunrpc_str, "ar_stat %u", astat));
astat = (enum sunrpc_accept_stat) GET_BE_U_4(dp);
if (astat != SUNRPC_SUCCESS) {
ND_PRINT(" %s", tok2str(sunrpc_str, "ar_stat %u", astat));
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);
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);
parse_pre_op_attr(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
parse_pre_op_attr(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
parse_post_op_attr(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
parse_post_op_attr(netdissect_options *ndo,
const uint32_t *dp, int verbose)
{
return parsefattr(ndo, dp, verbose, 1);
} else
return (dp + (NFSX_V3FATTR / sizeof (uint32_t)));
return parsefattr(ndo, dp, verbose, 1);
} else
return (dp + (NFSX_V3FATTR / sizeof (uint32_t)));
/*
* This displays the 8 bytes of the verifier in order,
* from the low-order byte to the high-order byte.
/*
* This displays the 8 bytes of the verifier in order,
* from the low-order byte to the high-order byte.
- if (parsewccres(ndo, dp, ndo->ndo_vflag, &nfserr) == 0)
+ if (parsewccres(ndo, dp, ndo->ndo_vflag, &nfserr) == NULL)
goto trunc;
} else {
if (parseattrstat(ndo, dp, !ndo->ndo_qflag, 0, &nfserr) == 0)
goto trunc;
} else {
if (parseattrstat(ndo, dp, !ndo->ndo_qflag, 0, &nfserr) == 0)
ND_PRINT(" %u bytes", GET_BE_U_4(dp));
if (ndo->ndo_vflag > 1) {
ND_PRINT(" %u bytes", GET_BE_U_4(dp));
if (ndo->ndo_vflag > 1) {
ND_PRINT(" <%s>",
tok2str(nfsv3_writemodes,
NULL, GET_BE_U_4(dp + 1)));
/* write-verf-cookie */
ND_PRINT(" <%s>",
tok2str(nfsv3_writemodes,
NULL, GET_BE_U_4(dp + 1)));
/* write-verf-cookie */