1#ifndef _NFS_H
2
3#define _NFS_H
4
5#include <SupportDefs.h>
6
7#define NFS_VERSION 2
8#define NFS_PROGRAM 100003
9
10typedef enum nfs_stat
11{
12	NFS_OK = 0,
13	NFSERR_PERM=1,
14	NFSERR_NOENT=2,
15	NFSERR_IO=5,
16	NFSERR_NXIO=6,
17	NFSERR_ACCES=13,
18	NFSERR_EXIST=17,
19	NFSERR_NODEV=19,
20	NFSERR_NOTDIR=20,
21	NFSERR_ISDIR=21,
22	NFSERR_FBIG=27,
23	NFSERR_NOSPC=28,
24	NFSERR_ROFS=30,
25	NFSERR_NAMETOOLONG=63,
26	NFSERR_NOTEMPTY=66,
27	NFSERR_DQUOT=69,
28	NFSERR_STALE=70,
29	NFSERR_WFLUSH=99
30} nfs_stat;
31
32
33typedef enum nfs_ftype
34{
35	NFS_NFNON = 0,
36	NFS_NFREG = 1,
37	NFS_NFDIR = 2,
38	NFS_NFBLK = 3,
39	NFS_NFCHR = 4,
40	NFS_NFLNK = 5
41} nfs_ftype;
42
43//#define NFS_MAXDATA 8192
44#define NFS_MAXDATA 1024
45
46/* The maximum number of bytes in a pathname argument. */
47#define NFS_MAXPATHLEN 1024
48
49/* The maximum number of bytes in a file name argument. */
50#define NFS_MAXNAMLEN 255
51
52/* The size in bytes of the opaque "cookie" passed by READDIR. */
53#define NFS_COOKIESIZE 4
54
55/* The size in bytes of the opaque file handle. */
56#define NFS_FHSIZE 32
57
58enum
59{
60	NFSPROC_NULL       = 0,
61	NFSPROC_GETATTR    = 1,
62	NFSPROC_SETATTR    = 2,
63	NFSPROC_ROOT       = 3,
64	NFSPROC_LOOKUP     = 4,
65	NFSPROC_READLINK   = 5,
66	NFSPROC_READ       = 6,
67	NFSPROC_WRITECACHE = 7,
68	NFSPROC_WRITE      = 8,
69	NFSPROC_CREATE     = 9,
70	NFSPROC_REMOVE     = 10,
71	NFSPROC_RENAME     = 11,
72	NFSPROC_LINK       = 12,
73	NFSPROC_SYMLINK    = 13,
74	NFSPROC_MKDIR      = 14,
75	NFSPROC_RMDIR      = 15,
76	NFSPROC_READDIR    = 16,
77	NFSPROC_STATFS     = 17
78};
79
80struct nfs_fhandle
81{
82	char opaque[NFS_FHSIZE];
83};
84
85struct nfs_cookie
86{
87	char opaque[NFS_COOKIESIZE];
88};
89
90#endif
91