X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/08c3106614ee37bf4ab5e94091ed17ba8e49ffb2..36332137db86e917bceef892dd5ebdbf1687b51a:/parsenfsfh.c diff --git a/parsenfsfh.c b/parsenfsfh.c index b5c14e1a..8894ad13 100644 --- a/parsenfsfh.c +++ b/parsenfsfh.c @@ -41,18 +41,16 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.20 2001-06-15 07:42:19 itojun Exp $ (LBL)"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.28 2004-03-25 03:30:55 mcr Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include +#include -#include #include #include @@ -108,19 +106,19 @@ static const char rcsid[] = ((lsb) + ((e)<<8) + ((d)<<16) + ((c)<<24)) #endif -static int is_UCX(unsigned char *); +static int is_UCX(const unsigned char *); void Parse_fh(fh, len, fsidp, inop, osnamep, fsnamep, ourself) -register caddr_t *fh; -int len; +register const unsigned char *fh; +int len _U_; my_fsid *fsidp; ino_t *inop; -char **osnamep; /* if non-NULL, return OS name here */ -char **fsnamep; /* if non-NULL, return server fs name here (for VMS) */ +const char **osnamep; /* if non-NULL, return OS name here */ +const char **fsnamep; /* if non-NULL, return server fs name here (for VMS) */ int ourself; /* true if file handle was generated on this host */ { - register unsigned char *fhp = (unsigned char *)fh; + register const unsigned char *fhp = fh; u_int32_t temp; int fhtype = FHT_UNKNOWN; int i; @@ -402,17 +400,15 @@ 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"); #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)snprintf(&(fsidp->Opaque_Handle[i*2]), 3, "%.2X", fhp[i]); + /* XXX for now, give "bogus" values to aid debugging */ fsidp->fsid_code = 0; fsidp->Fsid_dev.Minor = 257; fsidp->Fsid_dev.Major = 257; @@ -438,7 +434,7 @@ int ourself; /* true if file handle was generated on this host */ */ static int is_UCX(fhp) -unsigned char *fhp; +const unsigned char *fhp; { register int i; int seen_null = 0;