summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/parsenfsfh.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcpdump/parsenfsfh.c')
-rw-r--r--contrib/tcpdump/parsenfsfh.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/contrib/tcpdump/parsenfsfh.c b/contrib/tcpdump/parsenfsfh.c
index 7ea8f27..0f4c3a5 100644
--- a/contrib/tcpdump/parsenfsfh.c
+++ b/contrib/tcpdump/parsenfsfh.c
@@ -9,7 +9,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
@@ -20,9 +20,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>
@@ -93,6 +90,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 */
@@ -370,15 +368,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;
OpenPOWER on IntegriCloud