1*05b00f60SXin Li /* 2*05b00f60SXin Li * Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation, 3*05b00f60SXin Li * Western Research Laboratory. All rights reserved. 4*05b00f60SXin Li * Copyright (c) 2001 Compaq Computer Corporation. All rights reserved. 5*05b00f60SXin Li * 6*05b00f60SXin Li * Permission to use, copy, and modify this software and its 7*05b00f60SXin Li * documentation is hereby granted only under the following terms and 8*05b00f60SXin Li * conditions. Both the above copyright notice and this permission 9*05b00f60SXin Li * notice must appear in all copies of the software, derivative works 10*05b00f60SXin Li * or modified versions, and any portions thereof, and both notices 11*05b00f60SXin Li * must appear in supporting documentation. 12*05b00f60SXin Li * 13*05b00f60SXin Li * Redistribution and use in source and binary forms, with or without 14*05b00f60SXin Li * modification, are permitted provided that the following conditions 15*05b00f60SXin Li * are met: 16*05b00f60SXin Li * 1. Redistributions of source code must retain the above copyright 17*05b00f60SXin Li * notice, this list of conditions and the following disclaimer. 18*05b00f60SXin Li * 2. Redistributions in binary form must reproduce the above copyright 19*05b00f60SXin Li * notice, this list of conditions and the following disclaimer in 20*05b00f60SXin Li * the documentation and/or other materials provided with the 21*05b00f60SXin Li * distribution. 22*05b00f60SXin Li * 23*05b00f60SXin Li * THE SOFTWARE IS PROVIDED "AS IS" AND COMPAQ COMPUTER CORPORATION 24*05b00f60SXin Li * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 25*05b00f60SXin Li * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 26*05b00f60SXin Li * EVENT SHALL COMPAQ COMPUTER CORPORATION BE LIABLE FOR ANY 27*05b00f60SXin Li * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 28*05b00f60SXin Li * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 29*05b00f60SXin Li * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 30*05b00f60SXin Li * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 31*05b00f60SXin Li * SOFTWARE. 32*05b00f60SXin Li */ 33*05b00f60SXin Li 34*05b00f60SXin Li /* 35*05b00f60SXin Li * nfsfh.h - NFS file handle definitions (for portable use) 36*05b00f60SXin Li * 37*05b00f60SXin Li * Jeffrey C. Mogul 38*05b00f60SXin Li * Digital Equipment Corporation 39*05b00f60SXin Li * Western Research Laboratory 40*05b00f60SXin Li */ 41*05b00f60SXin Li 42*05b00f60SXin Li /* 43*05b00f60SXin Li * Internal representation of dev_t, because different NFS servers 44*05b00f60SXin Li * that we might be spying upon use different external representations. 45*05b00f60SXin Li */ 46*05b00f60SXin Li typedef struct { 47*05b00f60SXin Li uint32_t Minor; /* upper case to avoid clashing with macro names */ 48*05b00f60SXin Li uint32_t Major; 49*05b00f60SXin Li } my_devt; 50*05b00f60SXin Li 51*05b00f60SXin Li #define dev_eq(a,b) ((a.Minor == b.Minor) && (a.Major == b.Major)) 52*05b00f60SXin Li 53*05b00f60SXin Li /* 54*05b00f60SXin Li * Many file servers now use a large file system ID. This is 55*05b00f60SXin Li * our internal representation of that. 56*05b00f60SXin Li */ 57*05b00f60SXin Li typedef struct { 58*05b00f60SXin Li my_devt Fsid_dev; /* XXX avoid name conflict with AIX */ 59*05b00f60SXin Li char Opaque_Handle[2 * 32 + 1]; 60*05b00f60SXin Li uint32_t fsid_code; 61*05b00f60SXin Li } my_fsid; 62*05b00f60SXin Li 63*05b00f60SXin Li #define fsid_eq(a,b) ((a.fsid_code == b.fsid_code) &&\ 64*05b00f60SXin Li dev_eq(a.Fsid_dev, b.Fsid_dev)) 65*05b00f60SXin Li 66*05b00f60SXin Li extern void Parse_fh(netdissect_options *, const unsigned char *, u_int, my_fsid *, uint32_t *, const char **, const char **, int); 67