2 * NFSv3 protocol definitions
7 #include <linux/sunrpc/msg_prot.h>
10 #define NFS3_PORT 2049
11 #define NFS3_MAXDATA 8192
12 #define NFS3_MAXPATHLEN PATH_MAX
13 #define NFS3_MAXNAMLEN NAME_MAX
14 #define NFS3_MAXGROUPS 16
15 #define NFS3_FHSIZE NFS_FHSIZE
16 #define NFS3_COOKIESIZE 4
17 #define NFS3_FIFO_DEV (-1)
18 #define NFS3MODE_FMT 0170000
19 #define NFS3MODE_DIR 0040000
20 #define NFS3MODE_CHR 0020000
21 #define NFS3MODE_BLK 0060000
22 #define NFS3MODE_REG 0100000
23 #define NFS3MODE_LNK 0120000
24 #define NFS3MODE_SOCK 0140000
25 #define NFS3MODE_FIFO 0010000
37 NFS3ERR_XDEV
= 18, /* new in NFSv3 */
41 NFS3ERR_INVAL
= 22, /* new in NFSv3 */
45 NFS3ERR_MLINK
= 31, /* new in NFSv3 */
46 NFS3ERR_NAMETOOLONG
= 63,
47 NFS3ERR_NOTEMPTY
= 66,
50 NFS3ERR_REMOTE
= 71, /* new in NFSv3 */
51 NFS3ERR_BADHANDLE
= 10001,/* ditto */
52 NFS3ERR_NOT_SYNC
= 10002,/* ditto */
53 NFS3ERR_BAD_COOKIE
= 10003,/* ditto */
54 NFS3ERR_NOTSUPP
= 10004,/* ditto */
55 NFS3ERR_TOOSMALL
= 10005,/* ditto */
56 NFS3ERR_SERVERFAULT
= 10006,/* ditto */
57 NFS3ERR_BADTYPE
= 10007,/* ditto */
58 NFS3ERR_JUKEBOX
= 10008,/* ditto */
69 NF3FIFO
= 7, /* changed from NFSv2 (was 8) */
73 #define NFS3_VERSION 3
74 #define NFSPROC_NULL 0
75 #define NFSPROC_GETATTR 1
76 #define NFSPROC_SETATTR 2
77 #define NFSPROC_ROOT 3
78 #define NFSPROC_LOOKUP 4
79 #define NFSPROC_READLINK 5
80 #define NFSPROC_READ 6
81 #define NFSPROC_WRITECACHE 7
82 #define NFSPROC_WRITE 8
83 #define NFSPROC_CREATE 9
84 #define NFSPROC_REMOVE 10
85 #define NFSPROC_RENAME 11
86 #define NFSPROC_LINK 12
87 #define NFSPROC_SYMLINK 13
88 #define NFSPROC_MKDIR 14
89 #define NFSPROC_RMDIR 15
90 #define NFSPROC_READDIR 16
91 #define NFSPROC_STATFS 17
93 #if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES)
97 __u8 data
[NFS3_FHSIZE
];
101 enum nfs3_ftype type
;
112 struct nfs_time atime
;
113 struct nfs_time mtime
;
114 struct nfs_time ctime
;
117 struct nfs3_wcc_attr
{
119 struct nfs_time mtime
;
120 struct nfs_time ctime
;
123 struct nfs3_wcc_data
{
124 struct nfs3_wcc_attr before
;
125 struct nfs3_wcc_attr after
;
134 struct nfs_time atime
;
135 struct nfs_time mtime
;
154 #ifdef NFS_NEED_XDR_TYPES
156 struct nfs3_sattrargs
{
158 struct nfs_sattr
* sattr
;
161 struct nfs3_diropargs
{
166 struct nfs3_readargs
{
173 struct nfs3_writeargs
{
180 struct nfs3_createargs
{
183 struct nfs_sattr
* sattr
;
186 struct nfs3_renameargs
{
187 struct nfs_fh
* fromfh
;
188 const char * fromname
;
189 struct nfs_fh
* tofh
;
193 struct nfs3_linkargs
{
194 struct nfs_fh
* fromfh
;
195 struct nfs_fh
* tofh
;
199 struct nfs3_symlinkargs
{
200 struct nfs_fh
* fromfh
;
201 const char * fromname
;
203 struct nfs_sattr
* sattr
;
206 struct nfs3_readdirargs
{
213 struct nfs3_diropok
{
215 struct nfs_fattr
* fattr
;
218 struct nfs3_readres
{
219 struct nfs_fattr
* fattr
;
223 struct nfs3_readlinkres
{
230 struct nfs3_readdirres
{
236 * The following are for NFSv3
240 __u8 data
[NFS3_FHSIZE
]
243 struct nfs3_wcc_attr
{
245 struct nfs_time mtime
;
246 struct nfs_time ctime
;
249 #endif /* NFS_NEED_XDR_TYPES */
250 #endif /* __KERNEL__ */