diff options
author | Max Laier <mlaier@FreeBSD.org> | 2007-10-16 02:31:48 +0000 |
---|---|---|
committer | Max Laier <mlaier@FreeBSD.org> | 2007-10-16 02:31:48 +0000 |
commit | abf2519367045ca1021214ea4a55622810dd8e4e (patch) | |
tree | 8c8221dcf086879544da49d1342bacd303933fa6 /contrib/tcpdump/parsenfsfh.c | |
parent | e57e181f0987727d6cb3bcb76554c83efe1476d8 (diff) | |
download | src-abf2519367045ca1021214ea4a55622810dd8e4e.tar.gz src-abf2519367045ca1021214ea4a55622810dd8e4e.zip |
Resolve merge conflicts
Approved by: re (kensmith)
Obtained from: tcpdump.org
Notes
Notes:
svn path=/head/; revision=172686
Diffstat (limited to 'contrib/tcpdump/parsenfsfh.c')
-rw-r--r-- | contrib/tcpdump/parsenfsfh.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/contrib/tcpdump/parsenfsfh.c b/contrib/tcpdump/parsenfsfh.c index 2e3da026b8f8..4aa8191d77bf 100644 --- a/contrib/tcpdump/parsenfsfh.c +++ b/contrib/tcpdump/parsenfsfh.c @@ -44,7 +44,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.28 2004/03/25 03:30:55 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.28.2.1 2007/06/15 19:15:04 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -81,6 +81,7 @@ static const char rcsid[] _U_ = #define FHT_SUNOS5 9 #define FHT_AIX32 10 #define FHT_HPUX9 11 +#define FHT_BSD44 12 #ifdef ultrix /* Nasty hack to keep the Ultrix C compiler from emitting bogus warnings */ @@ -148,6 +149,10 @@ int ourself; /* true if file handle was generated on this host */ #if defined(__osf__) fhtype = FHT_DECOSF; #endif +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) \ + || defined(__OpenBSD__) + fhtype = FHT_BSD44; +#endif } /* * This is basically a big decision tree @@ -198,8 +203,11 @@ int ourself; /* true if file handle was generated on this host */ * could be Ultrix, IRIX5, AIX, or SUNOS5 * might be HP-UX (depends on their values for minor devs) */ + if ((fhp[6] == 0) && (fhp[7] == 0)) { + fhtype = FHT_BSD44; + } /*XXX we probably only need to test of these two bytes */ - if ((fhp[21] == 0) && (fhp[23] == 0)) { + else if ((fhp[21] == 0) && (fhp[23] == 0)) { fhtype = FHT_ULTRIX; } else { @@ -265,6 +273,18 @@ int ourself; /* true if file handle was generated on this host */ *osnamep = "Auspex"; break; + case FHT_BSD44: + fsidp->Fsid_dev.Minor = fhp[0]; + fsidp->Fsid_dev.Major = fhp[1]; + fsidp->fsid_code = 0; + + temp = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]); + *inop = temp; + + if (osnamep) + *osnamep = "BSD 4.4"; + break; + case FHT_DECOSF: fsidp->fsid_code = make_uint32(fhp[7], fhp[6], fhp[5], fhp[4]); /* XXX could ignore 3 high-order bytes */ @@ -303,10 +323,16 @@ int ourself; /* true if file handle was generated on this host */ *osnamep = "IRIX5"; break; +#ifdef notdef case FHT_SUNOS3: + /* + * XXX - none of the heuristics above return this. + * Are there any SunOS 3.x systems around to care about? + */ if (osnamep) *osnamep = "SUNOS3"; break; +#endif case FHT_SUNOS4: fsidp->Fsid_dev.Minor = fhp[3]; |