nfsfh.h revision 127675
11638Srgrimes/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002/04/24 06:27:05 guy Exp $ (LBL) */ 250476Speter 31638Srgrimes/* 4115103Strhodes * Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation, 5115103Strhodes * Western Research Laboratory. All rights reserved. 6115103Strhodes * Copyright (c) 2001 Compaq Computer Corporation. All rights reserved. 7115103Strhodes * 83470Srgrimes * Permission to use, copy, and modify this software and its 9115103Strhodes * documentation is hereby granted only under the following terms and 10115103Strhodes * conditions. Both the above copyright notice and this permission 111638Srgrimes * notice must appear in all copies of the software, derivative works 12115103Strhodes * or modified versions, and any portions thereof, and both notices 13115103Strhodes * must appear in supporting documentation. 14115103Strhodes * 15115103Strhodes * Redistribution and use in source and binary forms, with or without 16115103Strhodes * modification, are permitted provided that the following conditions 17115103Strhodes * are met: 18115103Strhodes * 1. Redistributions of source code must retain the above copyright 19115103Strhodes * notice, this list of conditions and the following disclaimer. 2023559Swosch * 2. Redistributions in binary form must reproduce the above copyright 2123559Swosch * notice, this list of conditions and the following disclaimer in 22115103Strhodes * the documentation and/or other materials provided with the 23115103Strhodes * distribution. 2423559Swosch * 25115103Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND COMPAQ COMPUTER CORPORATION 2623559Swosch * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 2723559Swosch * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 2823559Swosch * EVENT SHALL COMPAQ COMPUTER CORPORATION BE LIABLE FOR ANY 29115103Strhodes * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 30115103Strhodes * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 31115103Strhodes * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 3223559Swosch * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 3323559Swosch * SOFTWARE. 3423559Swosch */ 35115103Strhodes 36115103Strhodes/* 3723559Swosch * nfsfh.h - NFS file handle definitions (for portable use) 3823559Swosch * 3923559Swosch * Jeffrey C. Mogul 40115103Strhodes * Digital Equipment Corporation 41115103Strhodes * Western Research Laboratory 4223559Swosch * $FreeBSD: head/contrib/tcpdump/nfsfh.h 127675 2004-03-31 14:57:24Z bms $ 43115103Strhodes * $NetBSD: nfsfh.h,v 1.1.1.2 1997/10/03 17:25:13 christos Exp $ 4423559Swosch */ 45115103Strhodes 46115103Strhodes/* 471638Srgrimes * Internal representation of dev_t, because different NFS servers 48115103Strhodes * that we might be spying upon use different external representations. 4923578Swosch */ 50115103Strhodestypedef struct { 51115103Strhodes u_int32_t Minor; /* upper case to avoid clashing with macro names */ 52115103Strhodes u_int32_t Major; 53115103Strhodes} my_devt; 54115103Strhodes 55115103Strhodes#define dev_eq(a,b) ((a.Minor == b.Minor) && (a.Major == b.Major)) 56115103Strhodes 57115103Strhodes/* 58115103Strhodes * Many file servers now use a large file system ID. This is 59115103Strhodes * our internal representation of that. 60115103Strhodes */ 611638Srgrimestypedef struct { 621638Srgrimes my_devt Fsid_dev; /* XXX avoid name conflict with AIX */ 631638Srgrimes char Opaque_Handle[2 * 32 + 1]; 641638Srgrimes u_int32_t fsid_code; 65115103Strhodes} my_fsid; 661638Srgrimes 671638Srgrimes#define fsid_eq(a,b) ((a.fsid_code == b.fsid_code) &&\ 681638Srgrimes dev_eq(a.Fsid_dev, b.Fsid_dev)) 691638Srgrimes 701638Srgrimesextern void Parse_fh(const unsigned char *, int, my_fsid *, ino_t *, const char **, const char **, int); 711638Srgrimes