nfsproto.h (50477) | nfsproto.h (83651) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfsproto.h 8.2 (Berkeley) 3/30/95 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfsproto.h 8.2 (Berkeley) 3/30/95 |
37 * $FreeBSD: head/sys/nfs/nfsproto.h 50477 1999-08-28 01:08:13Z peter $ | 37 * $FreeBSD: head/sys/nfs/nfsproto.h 83651 2001-09-18 23:32:09Z peter $ |
38 */ 39 40#ifndef _NFS_NFSPROTO_H_ 41#define _NFS_NFSPROTO_H_ 42 43/* 44 * nfs definitions as per the Version 2 and 3 specs 45 */ --- 118 unchanged lines hidden (view full) --- 164#define NFSPROC_RENAME 14 165#define NFSPROC_LINK 15 166#define NFSPROC_READDIR 16 167#define NFSPROC_READDIRPLUS 17 168#define NFSPROC_FSSTAT 18 169#define NFSPROC_FSINFO 19 170#define NFSPROC_PATHCONF 20 171#define NFSPROC_COMMIT 21 | 38 */ 39 40#ifndef _NFS_NFSPROTO_H_ 41#define _NFS_NFSPROTO_H_ 42 43/* 44 * nfs definitions as per the Version 2 and 3 specs 45 */ --- 118 unchanged lines hidden (view full) --- 164#define NFSPROC_RENAME 14 165#define NFSPROC_LINK 15 166#define NFSPROC_READDIR 16 167#define NFSPROC_READDIRPLUS 17 168#define NFSPROC_FSSTAT 18 169#define NFSPROC_FSINFO 19 170#define NFSPROC_PATHCONF 20 171#define NFSPROC_COMMIT 21 |
172#define NFSPROC_NOOP 22 173#define NFS_NPROCS 23 |
|
172 | 174 |
173/* And leasing (nqnfs) procedure numbers (must be last) */ 174#define NQNFSPROC_GETLEASE 22 175#define NQNFSPROC_VACATED 23 176#define NQNFSPROC_EVICTED 24 177 178#define NFSPROC_NOOP 25 179#define NFS_NPROCS 26 180 | |
181/* Actual Version 2 procedure numbers */ 182#define NFSV2PROC_NULL 0 183#define NFSV2PROC_GETATTR 1 184#define NFSV2PROC_SETATTR 2 185#define NFSV2PROC_NOOP 3 186#define NFSV2PROC_ROOT NFSV2PROC_NOOP /* Obsolete */ 187#define NFSV2PROC_LOOKUP 4 188#define NFSV2PROC_READLINK 5 --- 32 unchanged lines hidden (view full) --- 221#define NFSV3CREATE_GUARDED 1 222#define NFSV3CREATE_EXCLUSIVE 2 223 224#define NFSV3FSINFO_LINK 0x01 225#define NFSV3FSINFO_SYMLINK 0x02 226#define NFSV3FSINFO_HOMOGENEOUS 0x08 227#define NFSV3FSINFO_CANSETTIME 0x10 228 | 175/* Actual Version 2 procedure numbers */ 176#define NFSV2PROC_NULL 0 177#define NFSV2PROC_GETATTR 1 178#define NFSV2PROC_SETATTR 2 179#define NFSV2PROC_NOOP 3 180#define NFSV2PROC_ROOT NFSV2PROC_NOOP /* Obsolete */ 181#define NFSV2PROC_LOOKUP 4 182#define NFSV2PROC_READLINK 5 --- 32 unchanged lines hidden (view full) --- 215#define NFSV3CREATE_GUARDED 1 216#define NFSV3CREATE_EXCLUSIVE 2 217 218#define NFSV3FSINFO_LINK 0x01 219#define NFSV3FSINFO_SYMLINK 0x02 220#define NFSV3FSINFO_HOMOGENEOUS 0x08 221#define NFSV3FSINFO_CANSETTIME 0x10 222 |
229/* Conversion macros */ 230#define vtonfsv2_mode(t,m) \ 231 txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ 232 MAKEIMODE((t), (m))) 233#define vtonfsv3_mode(m) txdr_unsigned((m) & ALLPERMS) 234#define nfstov_mode(a) (fxdr_unsigned(u_int32_t, (a)) & ALLPERMS) 235#define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((int32_t)(a))]) 236#define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) 237#define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(u_int32_t,(a))&0x7] 238#define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(u_int32_t,(a))&0x7] 239 | |
240/* File types */ 241typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5, 242 NFSOCK=6, NFFIFO=7 } nfstype; 243 244/* Structs for common parts of the rpc's */ 245/* 246 * File Handle (32 bytes for version 2), variable up to 64 for version 3. 247 * File Handles of up to NFS_SMALLFH in size are stored directly in the --- 192 unchanged lines hidden --- | 223/* File types */ 224typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5, 225 NFSOCK=6, NFFIFO=7 } nfstype; 226 227/* Structs for common parts of the rpc's */ 228/* 229 * File Handle (32 bytes for version 2), variable up to 64 for version 3. 230 * File Handles of up to NFS_SMALLFH in size are stored directly in the --- 192 unchanged lines hidden --- |