diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/nfs3.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/nfs3.h')
-rw-r--r-- | include/linux/nfs3.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h new file mode 100644 index 000000000000..7f11fa589207 --- /dev/null +++ b/include/linux/nfs3.h | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | * NFSv3 protocol definitions | ||
3 | */ | ||
4 | #ifndef _LINUX_NFS3_H | ||
5 | #define _LINUX_NFS3_H | ||
6 | |||
7 | #define NFS3_PORT 2049 | ||
8 | #define NFS3_MAXDATA 32768 | ||
9 | #define NFS3_MAXPATHLEN PATH_MAX | ||
10 | #define NFS3_MAXNAMLEN NAME_MAX | ||
11 | #define NFS3_MAXGROUPS 16 | ||
12 | #define NFS3_FHSIZE 64 | ||
13 | #define NFS3_COOKIESIZE 4 | ||
14 | #define NFS3_FIFO_DEV (-1) | ||
15 | #define NFS3MODE_FMT 0170000 | ||
16 | #define NFS3MODE_DIR 0040000 | ||
17 | #define NFS3MODE_CHR 0020000 | ||
18 | #define NFS3MODE_BLK 0060000 | ||
19 | #define NFS3MODE_REG 0100000 | ||
20 | #define NFS3MODE_LNK 0120000 | ||
21 | #define NFS3MODE_SOCK 0140000 | ||
22 | #define NFS3MODE_FIFO 0010000 | ||
23 | |||
24 | /* Flags for access() call */ | ||
25 | #define NFS3_ACCESS_READ 0x0001 | ||
26 | #define NFS3_ACCESS_LOOKUP 0x0002 | ||
27 | #define NFS3_ACCESS_MODIFY 0x0004 | ||
28 | #define NFS3_ACCESS_EXTEND 0x0008 | ||
29 | #define NFS3_ACCESS_DELETE 0x0010 | ||
30 | #define NFS3_ACCESS_EXECUTE 0x0020 | ||
31 | #define NFS3_ACCESS_FULL 0x003f | ||
32 | |||
33 | /* Flags for create mode */ | ||
34 | enum nfs3_createmode { | ||
35 | NFS3_CREATE_UNCHECKED = 0, | ||
36 | NFS3_CREATE_GUARDED = 1, | ||
37 | NFS3_CREATE_EXCLUSIVE = 2 | ||
38 | }; | ||
39 | |||
40 | /* NFSv3 file system properties */ | ||
41 | #define NFS3_FSF_LINK 0x0001 | ||
42 | #define NFS3_FSF_SYMLINK 0x0002 | ||
43 | #define NFS3_FSF_HOMOGENEOUS 0x0008 | ||
44 | #define NFS3_FSF_CANSETTIME 0x0010 | ||
45 | /* Some shorthands. See fs/nfsd/nfs3proc.c */ | ||
46 | #define NFS3_FSF_DEFAULT 0x001B | ||
47 | #define NFS3_FSF_BILLYBOY 0x0018 | ||
48 | #define NFS3_FSF_READONLY 0x0008 | ||
49 | |||
50 | enum nfs3_ftype { | ||
51 | NF3NON = 0, | ||
52 | NF3REG = 1, | ||
53 | NF3DIR = 2, | ||
54 | NF3BLK = 3, | ||
55 | NF3CHR = 4, | ||
56 | NF3LNK = 5, | ||
57 | NF3SOCK = 6, | ||
58 | NF3FIFO = 7, /* changed from NFSv2 (was 8) */ | ||
59 | NF3BAD = 8 | ||
60 | }; | ||
61 | |||
62 | struct nfs3_fh { | ||
63 | unsigned short size; | ||
64 | unsigned char data[NFS3_FHSIZE]; | ||
65 | }; | ||
66 | |||
67 | #define NFS3_VERSION 3 | ||
68 | #define NFS3PROC_NULL 0 | ||
69 | #define NFS3PROC_GETATTR 1 | ||
70 | #define NFS3PROC_SETATTR 2 | ||
71 | #define NFS3PROC_LOOKUP 3 | ||
72 | #define NFS3PROC_ACCESS 4 | ||
73 | #define NFS3PROC_READLINK 5 | ||
74 | #define NFS3PROC_READ 6 | ||
75 | #define NFS3PROC_WRITE 7 | ||
76 | #define NFS3PROC_CREATE 8 | ||
77 | #define NFS3PROC_MKDIR 9 | ||
78 | #define NFS3PROC_SYMLINK 10 | ||
79 | #define NFS3PROC_MKNOD 11 | ||
80 | #define NFS3PROC_REMOVE 12 | ||
81 | #define NFS3PROC_RMDIR 13 | ||
82 | #define NFS3PROC_RENAME 14 | ||
83 | #define NFS3PROC_LINK 15 | ||
84 | #define NFS3PROC_READDIR 16 | ||
85 | #define NFS3PROC_READDIRPLUS 17 | ||
86 | #define NFS3PROC_FSSTAT 18 | ||
87 | #define NFS3PROC_FSINFO 19 | ||
88 | #define NFS3PROC_PATHCONF 20 | ||
89 | #define NFS3PROC_COMMIT 21 | ||
90 | |||
91 | #define NFS_MNT3_PROGRAM 100005 | ||
92 | #define NFS_MNT3_VERSION 3 | ||
93 | #define MOUNTPROC3_NULL 0 | ||
94 | #define MOUNTPROC3_MNT 1 | ||
95 | #define MOUNTPROC3_UMNT 3 | ||
96 | #define MOUNTPROC3_UMNTALL 4 | ||
97 | |||
98 | |||
99 | #if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES) | ||
100 | |||
101 | /* Number of 32bit words in post_op_attr */ | ||
102 | #define NFS3_POST_OP_ATTR_WORDS 22 | ||
103 | |||
104 | #endif /* __KERNEL__ */ | ||
105 | #endif /* _LINUX_NFS3_H */ | ||