1
2
3
4
5
6
7
8 #ifndef _UAPI_LINUX_NFS_H
9 #define _UAPI_LINUX_NFS_H
10
11 #include <linux/types.h>
12
13 #define NFS_PROGRAM 100003
14 #define NFS_PORT 2049
15 #define NFS_RDMA_PORT 20049
16 #define NFS_MAXDATA 8192
17 #define NFS_MAXPATHLEN 1024
18 #define NFS_MAXNAMLEN 255
19 #define NFS_MAXGROUPS 16
20 #define NFS_FHSIZE 32
21 #define NFS_COOKIESIZE 4
22 #define NFS_FIFO_DEV (-1)
23 #define NFSMODE_FMT 0170000
24 #define NFSMODE_DIR 0040000
25 #define NFSMODE_CHR 0020000
26 #define NFSMODE_BLK 0060000
27 #define NFSMODE_REG 0100000
28 #define NFSMODE_LNK 0120000
29 #define NFSMODE_SOCK 0140000
30 #define NFSMODE_FIFO 0010000
31
32 #define NFS_MNT_PROGRAM 100005
33 #define NFS_MNT_VERSION 1
34 #define NFS_MNT3_VERSION 3
35
36 #define NFS_PIPE_DIRNAME "nfs"
37
38
39
40
41
42
43
44
45
46 enum nfs_stat {
47 NFS_OK = 0,
48 NFSERR_PERM = 1,
49 NFSERR_NOENT = 2,
50 NFSERR_IO = 5,
51 NFSERR_NXIO = 6,
52 NFSERR_EAGAIN = 11,
53 NFSERR_ACCES = 13,
54 NFSERR_EXIST = 17,
55 NFSERR_XDEV = 18,
56 NFSERR_NODEV = 19,
57 NFSERR_NOTDIR = 20,
58 NFSERR_ISDIR = 21,
59 NFSERR_INVAL = 22,
60 NFSERR_FBIG = 27,
61 NFSERR_NOSPC = 28,
62 NFSERR_ROFS = 30,
63 NFSERR_MLINK = 31,
64 NFSERR_OPNOTSUPP = 45,
65 NFSERR_NAMETOOLONG = 63,
66 NFSERR_NOTEMPTY = 66,
67 NFSERR_DQUOT = 69,
68 NFSERR_STALE = 70,
69 NFSERR_REMOTE = 71,
70 NFSERR_WFLUSH = 99,
71 NFSERR_BADHANDLE = 10001,
72 NFSERR_NOT_SYNC = 10002,
73 NFSERR_BAD_COOKIE = 10003,
74 NFSERR_NOTSUPP = 10004,
75 NFSERR_TOOSMALL = 10005,
76 NFSERR_SERVERFAULT = 10006,
77 NFSERR_BADTYPE = 10007,
78 NFSERR_JUKEBOX = 10008,
79 NFSERR_SAME = 10009,
80 NFSERR_DENIED = 10010,
81 NFSERR_EXPIRED = 10011,
82 NFSERR_LOCKED = 10012,
83 NFSERR_GRACE = 10013,
84 NFSERR_FHEXPIRED = 10014,
85 NFSERR_SHARE_DENIED = 10015,
86 NFSERR_WRONGSEC = 10016,
87 NFSERR_CLID_INUSE = 10017,
88 NFSERR_RESOURCE = 10018,
89 NFSERR_MOVED = 10019,
90 NFSERR_NOFILEHANDLE = 10020,
91 NFSERR_MINOR_VERS_MISMATCH = 10021,
92 NFSERR_STALE_CLIENTID = 10022,
93 NFSERR_STALE_STATEID = 10023,
94 NFSERR_OLD_STATEID = 10024,
95 NFSERR_BAD_STATEID = 10025,
96 NFSERR_BAD_SEQID = 10026,
97 NFSERR_NOT_SAME = 10027,
98 NFSERR_LOCK_RANGE = 10028,
99 NFSERR_SYMLINK = 10029,
100 NFSERR_RESTOREFH = 10030,
101 NFSERR_LEASE_MOVED = 10031,
102 NFSERR_ATTRNOTSUPP = 10032,
103 NFSERR_NO_GRACE = 10033,
104 NFSERR_RECLAIM_BAD = 10034,
105 NFSERR_RECLAIM_CONFLICT = 10035,
106 NFSERR_BAD_XDR = 10036,
107 NFSERR_LOCKS_HELD = 10037,
108 NFSERR_OPENMODE = 10038,
109 NFSERR_BADOWNER = 10039,
110 NFSERR_BADCHAR = 10040,
111 NFSERR_BADNAME = 10041,
112 NFSERR_BAD_RANGE = 10042,
113 NFSERR_LOCK_NOTSUPP = 10043,
114 NFSERR_OP_ILLEGAL = 10044,
115 NFSERR_DEADLOCK = 10045,
116 NFSERR_FILE_OPEN = 10046,
117 NFSERR_ADMIN_REVOKED = 10047,
118 NFSERR_CB_PATH_DOWN = 10048,
119 };
120
121
122
123 enum nfs_ftype {
124 NFNON = 0,
125 NFREG = 1,
126 NFDIR = 2,
127 NFBLK = 3,
128 NFCHR = 4,
129 NFLNK = 5,
130 NFSOCK = 6,
131 NFBAD = 7,
132 NFFIFO = 8
133 };
134
135 #endif