xref: /freebsd/contrib/tcpdump/nfsfh.h (revision ce834215a70ff69e7e222827437116eee2f9ac6f)
1 /*
2  * $Header: nfsfh.h,v 1.5 96/08/20 14:33:23 leres Exp $
3  *
4  * nfsfh.h - NFS file handle definitions (for portable use)
5  *
6  * Jeffrey C. Mogul
7  * Digital Equipment Corporation
8  * Western Research Laboratory
9  */
10 
11 /*
12  * Internal representation of dev_t, because different NFS servers
13  * that we might be spying upon use different external representations.
14  */
15 typedef struct {
16 	u_int32_t Minor;	/* upper case to avoid clashing with macro names */
17 	u_int32_t Major;
18 } my_devt;
19 
20 #define	dev_eq(a,b)	((a.Minor == b.Minor) && (a.Major == b.Major))
21 
22 /*
23  * Many file servers now use a large file system ID.  This is
24  * our internal representation of that.
25  */
26 typedef	struct {
27 	my_devt	Fsid_dev;		/* XXX avoid name conflict with AIX */
28 	u_int32_t fsid_code;
29 } my_fsid;
30 
31 #define	fsid_eq(a,b)	((a.fsid_code == b.fsid_code) &&\
32 			 dev_eq(a.fsid_dev, b.fsid_dev))
33 
34 extern void Parse_fh(caddr_t *, int, my_fsid *, ino_t *, char **, char **, int);
35