OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [linux/] [nfs.h] - Blame information for rev 199

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#ifndef _LINUX_NFS_H
2
#define _LINUX_NFS_H
3
 
4
#define NFS_PORT 2049
5
#define NFS_MAXDATA 8192
6
#define NFS_MAXPATHLEN 1024
7
#define NFS_MAXNAMLEN 255
8
#define NFS_MAXGROUPS 16
9
#define NFS_FHSIZE 32
10
#define NFS_COOKIESIZE 4
11
#define NFS_FIFO_DEV (-1)
12
#define NFSMODE_FMT 0170000
13
#define NFSMODE_DIR 0040000
14
#define NFSMODE_CHR 0020000
15
#define NFSMODE_BLK 0060000
16
#define NFSMODE_REG 0100000
17
#define NFSMODE_LNK 0120000
18
#define NFSMODE_SOCK 0140000
19
#define NFSMODE_FIFO 0010000
20
 
21
#ifdef __KERNEL__ /* user programs should get these from the rpc header files */
22
 
23
#define RPC_VERSION 2
24
 
25
enum rpc_auth_flavor {
26
        RPC_AUTH_NULL = 0,
27
        RPC_AUTH_UNIX = 1,
28
        RPC_AUTH_SHORT = 2
29
};
30
 
31
enum rpc_msg_type {
32
        RPC_CALL = 0,
33
        RPC_REPLY = 1
34
};
35
 
36
enum rpc_reply_stat {
37
        RPC_MSG_ACCEPTED = 0,
38
        RPC_MSG_DENIED = 1
39
};
40
 
41
enum rpc_accept_stat {
42
        RPC_SUCCESS = 0,
43
        RPC_PROG_UNAVAIL = 1,
44
        RPC_PROG_MISMATCH = 2,
45
        RPC_PROC_UNAVAIL = 3,
46
        RPC_GARBAGE_ARGS = 4
47
};
48
 
49
enum rpc_reject_stat {
50
        RPC_MISMATCH = 0,
51
        RPC_AUTH_ERROR = 1
52
};
53
 
54
enum rpc_auth_stat {
55
        RPC_AUTH_BADCRED = 1,
56
        RPC_AUTH_REJECTEDCRED = 2,
57
        RPC_AUTH_BADVERF = 3,
58
        RPC_AUTH_REJECTEDVERF = 4,
59
        RPC_AUTH_TOOWEAK = 5
60
};
61
 
62
#endif /* __KERNEL__ */
63
 
64
enum nfs_stat {
65
        NFS_OK = 0,
66
        NFSERR_PERM = 1,
67
        NFSERR_NOENT = 2,
68
        NFSERR_IO = 5,
69
        NFSERR_NXIO = 6,
70
        NFSERR_EAGAIN = 11,
71
        NFSERR_ACCES = 13,
72
        NFSERR_EXIST = 17,
73
        NFSERR_XDEV = 18,
74
        NFSERR_NODEV = 19,
75
        NFSERR_NOTDIR = 20,
76
        NFSERR_ISDIR = 21,
77
        NFSERR_INVAL = 22,      /* that Sun forgot */
78
        NFSERR_FBIG = 27,
79
        NFSERR_NOSPC = 28,
80
        NFSERR_ROFS = 30,
81
        NFSERR_NAMETOOLONG = 63,
82
        NFSERR_NOTEMPTY = 66,
83
        NFSERR_DQUOT = 69,
84
        NFSERR_STALE = 70,
85
        NFSERR_WFLUSH = 99
86
};
87
 
88
enum nfs_ftype {
89
        NFNON = 0,
90
        NFREG = 1,
91
        NFDIR = 2,
92
        NFBLK = 3,
93
        NFCHR = 4,
94
        NFLNK = 5,
95
        NFSOCK = 6,
96
        NFBAD = 7,
97
        NFFIFO = 8
98
};
99
 
100
#define NFS_PROGRAM             100003
101
#define NFS_VERSION             2
102
#define NFSPROC_NULL            0
103
#define NFSPROC_GETATTR         1
104
#define NFSPROC_SETATTR         2
105
#define NFSPROC_ROOT            3
106
#define NFSPROC_LOOKUP          4
107
#define NFSPROC_READLINK        5
108
#define NFSPROC_READ            6
109
#define NFSPROC_WRITECACHE      7
110
#define NFSPROC_WRITE           8
111
#define NFSPROC_CREATE          9
112
#define NFSPROC_REMOVE          10
113
#define NFSPROC_RENAME          11
114
#define NFSPROC_LINK            12
115
#define NFSPROC_SYMLINK         13
116
#define NFSPROC_MKDIR           14
117
#define NFSPROC_RMDIR           15
118
#define NFSPROC_READDIR         16
119
#define NFSPROC_STATFS          17
120
 
121
struct nfs_fh {
122
        char data[NFS_FHSIZE];
123
};
124
 
125
struct nfs_time {
126
        u_int seconds;
127
        u_int useconds;
128
};
129
 
130
struct nfs_fattr {
131
        enum nfs_ftype type;
132
        u_int mode;
133
        u_int nlink;
134
        u_int uid;
135
        u_int gid;
136
        u_int size;
137
        u_int blocksize;
138
        u_int rdev;
139
        u_int blocks;
140
        u_int fsid;
141
        u_int fileid;
142
        struct nfs_time atime;
143
        struct nfs_time mtime;
144
        struct nfs_time ctime;
145
};
146
 
147
struct nfs_sattr {
148
        u_int mode;
149
        u_int uid;
150
        u_int gid;
151
        u_int size;
152
        struct nfs_time atime;
153
        struct nfs_time mtime;
154
};
155
 
156
struct nfs_entry {
157
        u_int fileid;
158
        char *name;
159
        int cookie;
160
        int eof;
161
};
162
 
163
struct nfs_fsinfo {
164
        u_int tsize;
165
        u_int bsize;
166
        u_int blocks;
167
        u_int bfree;
168
        u_int bavail;
169
};
170
 
171
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.