1190207Srpaulo/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002-04-24 06:27:05 guy Exp $ (LBL) */
298527Sfenner
317680Spst/*
498527Sfenner * Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation,
598527Sfenner * Western Research Laboratory. All rights reserved.
698527Sfenner * Copyright (c) 2001 Compaq Computer Corporation. All rights reserved.
717680Spst *
898527Sfenner *  Permission to use, copy, and modify this software and its
998527Sfenner *  documentation is hereby granted only under the following terms and
1098527Sfenner *  conditions.  Both the above copyright notice and this permission
1198527Sfenner *  notice must appear in all copies of the software, derivative works
1298527Sfenner *  or modified versions, and any portions thereof, and both notices
1398527Sfenner *  must appear in supporting documentation.
1498527Sfenner *
1598527Sfenner *  Redistribution and use in source and binary forms, with or without
1698527Sfenner *  modification, are permitted provided that the following conditions
1798527Sfenner *  are met:
1898527Sfenner *    1. Redistributions of source code must retain the above copyright
1998527Sfenner *    notice, this list of conditions and the following disclaimer.
2098527Sfenner *    2. Redistributions in binary form must reproduce the above copyright
2198527Sfenner *    notice, this list of conditions and the following disclaimer in
2298527Sfenner *    the documentation and/or other materials provided with the
2398527Sfenner *    distribution.
2498527Sfenner *
2598527Sfenner *  THE SOFTWARE IS PROVIDED "AS IS" AND COMPAQ COMPUTER CORPORATION
2698527Sfenner *  DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
2798527Sfenner *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.   IN NO
2898527Sfenner *  EVENT SHALL COMPAQ COMPUTER CORPORATION BE LIABLE FOR ANY
2998527Sfenner *  SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3098527Sfenner *  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
3198527Sfenner *  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
3298527Sfenner *  OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
3398527Sfenner *  SOFTWARE.
3498527Sfenner */
3598527Sfenner
3698527Sfenner/*
3717680Spst * nfsfh.h - NFS file handle definitions (for portable use)
3817680Spst *
3917680Spst * Jeffrey C. Mogul
4017680Spst * Digital Equipment Corporation
4117680Spst * Western Research Laboratory
4256896Sfenner *	$FreeBSD$
4398527Sfenner *	$NetBSD: nfsfh.h,v 1.1.1.2 1997/10/03 17:25:13 christos Exp $
4498527Sfenner */
4517680Spst
4617680Spst/*
4717680Spst * Internal representation of dev_t, because different NFS servers
4817680Spst * that we might be spying upon use different external representations.
4917680Spst */
5017680Spsttypedef struct {
5117680Spst	u_int32_t Minor;	/* upper case to avoid clashing with macro names */
5217680Spst	u_int32_t Major;
5317680Spst} my_devt;
5417680Spst
5517680Spst#define	dev_eq(a,b)	((a.Minor == b.Minor) && (a.Major == b.Major))
5617680Spst
5717680Spst/*
5817680Spst * Many file servers now use a large file system ID.  This is
5917680Spst * our internal representation of that.
6017680Spst */
6117680Spsttypedef	struct {
6226183Sfenner	my_devt	Fsid_dev;		/* XXX avoid name conflict with AIX */
6375118Sfenner	char Opaque_Handle[2 * 32 + 1];
6417680Spst	u_int32_t fsid_code;
6517680Spst} my_fsid;
6617680Spst
6717680Spst#define	fsid_eq(a,b)	((a.fsid_code == b.fsid_code) &&\
6839300Sfenner			 dev_eq(a.Fsid_dev, b.Fsid_dev))
6917680Spst
70127675Sbmsextern void Parse_fh(const unsigned char *, int, my_fsid *, ino_t *, const char **, const char **, int);
71