- Kai Germaschewski: ymfpci cleanups and resource leak fixes
[davej-history.git] / include / linux / nfs3.h
blob1f45a9296488e8872f8e95eb0e90c7c4d4a480f9
1 /*
2 * NFSv3 protocol definitions
3 */
4 #ifndef _LINUX_NFS3_H
5 #define _LINUX_NFS3_H
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
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
32 /* Flags for create mode */
33 enum nfs3_createmode {
34 NFS3_CREATE_UNCHECKED = 0,
35 NFS3_CREATE_GUARDED = 1,
36 NFS3_CREATE_EXCLUSIVE = 2
39 /* NFSv3 file system properties */
40 #define NFS3_FSF_LINK 0x0001
41 #define NFS3_FSF_SYMLINK 0x0002
42 #define NFS3_FSF_HOMOGENEOUS 0x0008
43 #define NFS3_FSF_CANSETTIME 0x0010
44 /* Some shorthands. See fs/nfsd/nfs3proc.c */
45 #define NFS3_FSF_DEFAULT 0x001B
46 #define NFS3_FSF_BILLYBOY 0x0018
47 #define NFS3_FSF_READONLY 0x0008
49 enum nfs3_ftype {
50 NF3NON = 0,
51 NF3REG = 1,
52 NF3DIR = 2,
53 NF3BLK = 3,
54 NF3CHR = 4,
55 NF3LNK = 5,
56 NF3SOCK = 6,
57 NF3FIFO = 7, /* changed from NFSv2 (was 8) */
58 NF3BAD = 8
61 #define NFS3_VERSION 3
62 #define NFS3PROC_NULL 0
63 #define NFS3PROC_GETATTR 1
64 #define NFS3PROC_SETATTR 2
65 #define NFS3PROC_LOOKUP 3
66 #define NFS3PROC_ACCESS 4
67 #define NFS3PROC_READLINK 5
68 #define NFS3PROC_READ 6
69 #define NFS3PROC_WRITE 7
70 #define NFS3PROC_CREATE 8
71 #define NFS3PROC_MKDIR 9
72 #define NFS3PROC_SYMLINK 10
73 #define NFS3PROC_MKNOD 11
74 #define NFS3PROC_REMOVE 12
75 #define NFS3PROC_RMDIR 13
76 #define NFS3PROC_RENAME 14
77 #define NFS3PROC_LINK 15
78 #define NFS3PROC_READDIR 16
79 #define NFS3PROC_READDIRPLUS 17
80 #define NFS3PROC_FSSTAT 18
81 #define NFS3PROC_FSINFO 19
82 #define NFS3PROC_PATHCONF 20
83 #define NFS3PROC_COMMIT 21
85 #define NFS_MNT3_PROGRAM 100005
86 #define NFS_MNT3_VERSION 3
87 #define MOUNTPROC3_NULL 0
88 #define MOUNTPROC3_MNT 1
89 #define MOUNTPROC3_UMNT 3
90 #define MOUNTPROC3_UMNTALL 4
93 #if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES)
95 /* Number of 32bit words in post_op_attr */
96 #define NFS3_POST_OP_ATTR_WORDS 22
98 #endif /* __KERNEL__ */
99 #endif /* _LINUX_NFS3_H */