diff options
author | fenner <fenner@FreeBSD.org> | 2001-04-03 07:50:46 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-04-03 07:50:46 +0000 |
commit | 2877f5b6133ecd5a0574b61880855776ec518278 (patch) | |
tree | 133b57ac128ee361805e9c2bedbcb790324dac62 /contrib/tcpdump/parsenfsfh.c | |
parent | f7d9a5e270bfcbb075a637a52416185441d33d8d (diff) | |
download | FreeBSD-src-2877f5b6133ecd5a0574b61880855776ec518278.zip FreeBSD-src-2877f5b6133ecd5a0574b61880855776ec518278.tar.gz |
Merge tcpdump 3.6.2
Diffstat (limited to 'contrib/tcpdump/parsenfsfh.c')
-rw-r--r-- | contrib/tcpdump/parsenfsfh.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/contrib/tcpdump/parsenfsfh.c b/contrib/tcpdump/parsenfsfh.c index c59ad6a..6712e49 100644 --- a/contrib/tcpdump/parsenfsfh.c +++ b/contrib/tcpdump/parsenfsfh.c @@ -11,7 +11,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.16 1999/11/21 09:36:47 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.18 2000/07/01 03:39:00 assar Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -22,9 +22,6 @@ static const char rcsid[] = #include <sys/time.h> #include <ctype.h> -#ifdef HAVE_MEMORY_H -#include <memory.h> -#endif #include <stdio.h> #include <string.h> @@ -95,6 +92,7 @@ int ourself; /* true if file handle was generated on this host */ register unsigned char *fhp = (unsigned char *)fh; u_int32_t temp; int fhtype = FHT_UNKNOWN; + int i; if (ourself) { /* File handle generated on this host, no need for guessing */ @@ -372,15 +370,18 @@ int ourself; /* true if file handle was generated on this host */ case FHT_UNKNOWN: #ifdef DEBUG - { - /* XXX debugging */ - int i; - for (i = 0; i < 32; i++) - (void)fprintf(stderr, "%x.", fhp[i]); - (void)fprintf(stderr, "\n"); - } + /* XXX debugging */ + int i; + for (i = 0; i < 32; i++) + (void)fprintf(stderr, "%x.", fhp[i]); + (void)fprintf(stderr, "\n"); #endif /* XXX for now, give "bogus" values to aid debugging */ + + /* Save the actual handle, so it can be display with -u */ + for (i = 0; i < 32; i++) + (void)sprintf(&(fsidp->Opaque_Handle[i*2]), "%.2X", fhp[i]); + fsidp->fsid_code = 0; fsidp->Fsid_dev.Minor = 257; fsidp->Fsid_dev.Major = 257; |