#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.105 2005-01-05 03:55:05 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.106.2.2 2005-05-06 07:57:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
cp = (u_char *)dp;
/* Update 32-bit pointer (NFS filenames padded to 32-bit boundaries) */
dp += ((len + 3) & ~3) / sizeof(*dp);
- /* XXX seems like we should be checking the length */
putchar('"');
- (void) fn_printn(cp, len, NULL);
+ if (fn_printn(cp, len, snapend)) {
+ putchar('"');
+ goto trunc;
+ }
putchar('"');
return (dp);
if ((dp = parsereq(rp, length)) != NULL &&
(dp = parsefh(dp, v3)) != NULL) {
if (v3) {
- TCHECK(dp[3]);
- printf(" %u bytes @ %" PRIu64,
- EXTRACT_32BITS(&dp[3]),
+ TCHECK(dp[2]);
+ printf(" %u (%u) bytes @ %" PRIu64,
+ EXTRACT_32BITS(&dp[4]),
+ EXTRACT_32BITS(&dp[2]),
EXTRACT_64BITS(&dp[0]));
if (vflag) {
dp += 3;
/*
* now we can check the ar_stat field
*/
- astat = EXTRACT_32BITS(dp);
+ astat = (enum sunrpc_accept_stat) EXTRACT_32BITS(dp);
switch (astat) {
case SUNRPC_SUCCESS: