summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/parsenfsfh.c
diff options
context:
space:
mode:
authorbitblt <bitblt@cvs.openbsd.org>1996-12-12 16:23:06 +0000
committerbitblt <bitblt@cvs.openbsd.org>1996-12-12 16:23:06 +0000
commit60909394a7629154d32d662f864cc3dd5c52ee64 (patch)
tree0c1671db4b72cc060eed235adfc04454f88e0163 /usr.sbin/tcpdump/parsenfsfh.c
parent2da72263fb9852691068f6bd411c3026a8fd34d4 (diff)
*** empty log message ***
Diffstat (limited to 'usr.sbin/tcpdump/parsenfsfh.c')
-rw-r--r--usr.sbin/tcpdump/parsenfsfh.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/usr.sbin/tcpdump/parsenfsfh.c b/usr.sbin/tcpdump/parsenfsfh.c
index 08637b62688..5ecc37b5a08 100644
--- a/usr.sbin/tcpdump/parsenfsfh.c
+++ b/usr.sbin/tcpdump/parsenfsfh.c
@@ -1,9 +1,3 @@
-/* $OpenBSD: parsenfsfh.c,v 1.4 1996/07/13 11:01:14 mickey Exp $ */
-
-#ifndef lint
-static char *RCSid = "Header: parsenfsfh.c,v 1.9 95/10/19 20:27:44 leres Exp";
-#endif
-
/*
* parsenfsfh.c - portable parser for NFS file handles
* uses all sorts of heuristics
@@ -13,6 +7,11 @@ static char *RCSid = "Header: parsenfsfh.c,v 1.9 95/10/19 20:27:44 leres Exp";
* Western Research Laboratory
*/
+#ifndef lint
+static const char rcsid[] =
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/parsenfsfh.c,v 1.5 1996/12/12 16:22:44 bitblt Exp $ (LBL)";
+#endif
+
#include <sys/types.h>
#include <sys/time.h>
@@ -217,8 +216,8 @@ int ourself; /* true if file handle was generated on this host */
switch (fhtype) {
case FHT_AUSPEX:
- fsidp->fsid_dev.Minor = fhp[7];
- fsidp->fsid_dev.Major = fhp[6];
+ fsidp->Fsid_dev.Minor = fhp[7];
+ fsidp->Fsid_dev.Major = fhp[6];
fsidp->fsid_code = 0;
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -233,8 +232,8 @@ int ourself; /* true if file handle was generated on this host */
/* XXX could ignore 3 high-order bytes */
temp = make_uint32(fhp[3], fhp[2], fhp[1], fhp[0]);
- fsidp->fsid_dev.Minor = temp & 0xFFFFF;
- fsidp->fsid_dev.Major = (temp>>20) & 0xFFF;
+ fsidp->Fsid_dev.Minor = temp & 0xFFFFF;
+ fsidp->Fsid_dev.Major = (temp>>20) & 0xFFF;
temp = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
*inop = temp;
@@ -243,8 +242,8 @@ int ourself; /* true if file handle was generated on this host */
break;
case FHT_IRIX4:
- fsidp->fsid_dev.Minor = fhp[3];
- fsidp->fsid_dev.Major = fhp[2];
+ fsidp->Fsid_dev.Minor = fhp[3];
+ fsidp->Fsid_dev.Major = fhp[2];
fsidp->fsid_code = 0;
temp = make_uint32(fhp[8], fhp[9], fhp[10], fhp[11]);
@@ -255,8 +254,8 @@ int ourself; /* true if file handle was generated on this host */
break;
case FHT_IRIX5:
- fsidp->fsid_dev.Minor = make_uint16(fhp[2], fhp[3]);
- fsidp->fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
+ fsidp->Fsid_dev.Minor = make_uint16(fhp[2], fhp[3]);
+ fsidp->Fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -272,8 +271,8 @@ int ourself; /* true if file handle was generated on this host */
break;
case FHT_SUNOS4:
- fsidp->fsid_dev.Minor = fhp[3];
- fsidp->fsid_dev.Major = fhp[2];
+ fsidp->Fsid_dev.Minor = fhp[3];
+ fsidp->Fsid_dev.Major = fhp[2];
fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -285,9 +284,9 @@ int ourself; /* true if file handle was generated on this host */
case FHT_SUNOS5:
temp = make_uint16(fhp[0], fhp[1]);
- fsidp->fsid_dev.Major = (temp>>2) & 0x3FFF;
+ fsidp->Fsid_dev.Major = (temp>>2) & 0x3FFF;
temp = make_uint24(fhp[1], fhp[2], fhp[3]);
- fsidp->fsid_dev.Minor = temp & 0x3FFFF;
+ fsidp->Fsid_dev.Minor = temp & 0x3FFFF;
fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -299,8 +298,8 @@ int ourself; /* true if file handle was generated on this host */
case FHT_ULTRIX:
fsidp->fsid_code = 0;
- fsidp->fsid_dev.Minor = fhp[0];
- fsidp->fsid_dev.Major = fhp[1];
+ fsidp->Fsid_dev.Minor = fhp[0];
+ fsidp->Fsid_dev.Major = fhp[1];
temp = make_uint32(fhp[7], fhp[6], fhp[5], fhp[4]);
*inop = temp;
@@ -320,8 +319,8 @@ int ourself; /* true if file handle was generated on this host */
memset((char *)tempa, 0, sizeof(tempa));
memcpy((char *)tempa, fh, 14); /* ensure alignment */
- fsidp->fsid_dev.Minor = tempa[0] + (tempa[1]<<1);
- fsidp->fsid_dev.Major = tempa[2] + (tempa[3]<<1);
+ fsidp->Fsid_dev.Minor = tempa[0] + (tempa[1]<<1);
+ fsidp->Fsid_dev.Major = tempa[2] + (tempa[3]<<1);
fsidp->fsid_code = 0;
}
@@ -337,8 +336,8 @@ int ourself; /* true if file handle was generated on this host */
break;
case FHT_AIX32:
- fsidp->fsid_dev.Minor = make_uint16(fhp[2], fhp[3]);
- fsidp->fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
+ fsidp->Fsid_dev.Minor = make_uint16(fhp[2], fhp[3]);
+ fsidp->Fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -349,9 +348,9 @@ int ourself; /* true if file handle was generated on this host */
break;
case FHT_HPUX9:
- fsidp->fsid_dev.Major = fhp[0];
+ fsidp->Fsid_dev.Major = fhp[0];
temp = make_uint24(fhp[1], fhp[2], fhp[3]);
- fsidp->fsid_dev.Minor = temp;
+ fsidp->Fsid_dev.Minor = temp;
fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
@@ -373,8 +372,8 @@ int ourself; /* true if file handle was generated on this host */
#endif
/* XXX for now, give "bogus" values to aid debugging */
fsidp->fsid_code = 0;
- fsidp->fsid_dev.Minor = 257;
- fsidp->fsid_dev.Major = 257;
+ fsidp->Fsid_dev.Minor = 257;
+ fsidp->Fsid_dev.Major = 257;
*inop = 1;
/* display will show this string instead of (257,257) */