btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / src / add-ons / kernel / file_systems / nfs / nfs.h
bloba8869d9ba24c4c5ddd01ddbe4a6ee75522560c0d
1 #ifndef _NFS_H
3 #define _NFS_H
5 #include <SupportDefs.h>
7 const int32 NFS_VERSION=2;
8 const int32 NFS_PROGRAM=100003;
10 typedef enum nfs_stat
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;
33 typedef enum nfs_ftype
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;
43 //#define NFS_MAXDATA 8192
44 #define NFS_MAXDATA 1024
46 /* The maximum number of bytes in a pathname argument. */
47 #define NFS_MAXPATHLEN 1024
49 /* The maximum number of bytes in a file name argument. */
50 #define NFS_MAXNAMLEN 255
52 /* The size in bytes of the opaque "cookie" passed by READDIR. */
53 #define NFS_COOKIESIZE 4
55 /* The size in bytes of the opaque file handle. */
56 #define NFS_FHSIZE 32
58 enum
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
80 struct nfs_fhandle
82 char opaque[NFS_FHSIZE];
85 struct nfs_cookie
87 char opaque[NFS_COOKIESIZE];
90 #endif