RTEMS  5.0.0
nfs_prot.h
1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5 
6 #ifndef _NFS_PROT_H_RPCGEN
7 #define _NFS_PROT_H_RPCGEN
8 
9 #include <rpc/rpc.h>
10 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define NFS_PORT 2049
22 #define NFS_MAXDATA 8192
23 #define NFS_MAXPATHLEN 1024
24 #define NFS_MAXNAMLEN 255
25 #define NFS_FHSIZE 32
26 #define NFS_COOKIESIZE 4
27 #define NFS_FIFO_DEV -1
28 #define NFSMODE_FMT 0170000
29 #define NFSMODE_DIR 0040000
30 #define NFSMODE_CHR 0020000
31 #define NFSMODE_BLK 0060000
32 #define NFSMODE_REG 0100000
33 #define NFSMODE_LNK 0120000
34 #define NFSMODE_SOCK 0140000
35 #define NFSMODE_FIFO 0010000
36 
37 enum nfsstat {
38  NFS_OK = 0,
39  NFSERR_PERM = 1,
40  NFSERR_NOENT = 2,
41  NFSERR_IO = 5,
42  NFSERR_NXIO = 6,
43  NFSERR_ACCES = 13,
44  NFSERR_EXIST = 17,
45  NFSERR_NODEV = 19,
46  NFSERR_NOTDIR = 20,
47  NFSERR_ISDIR = 21,
48  NFSERR_FBIG = 27,
49  NFSERR_NOSPC = 28,
50  NFSERR_ROFS = 30,
51  NFSERR_NAMETOOLONG = 63,
52  NFSERR_NOTEMPTY = 66,
53  NFSERR_DQUOT = 69,
54  NFSERR_STALE = 70,
55  NFSERR_WFLUSH = 99,
56  _NFSSTAT = 0xffffffff
57 };
58 typedef enum nfsstat nfsstat;
59 
60 enum ftype {
61  NFNON = 0,
62  NFREG = 1,
63  NFDIR = 2,
64  NFBLK = 3,
65  NFCHR = 4,
66  NFLNK = 5,
67  NFSOCK = 6,
68  NFBAD = 7,
69  NFFIFO = 8,
70  _FTYPE = 0xffffffff
71 };
72 typedef enum ftype ftype;
73 
74 struct nfs_fh {
75  char data[NFS_FHSIZE];
76 };
77 typedef struct nfs_fh nfs_fh;
78 
79 struct nfstime {
80  u_int seconds;
81  u_int useconds;
82 };
83 typedef struct nfstime nfstime;
84 
85 struct fattr {
86  ftype type;
87  u_int mode;
88  u_int nlink;
89  u_int uid;
90  u_int gid;
91  u_int size;
92  u_int blocksize;
93  u_int rdev;
94  u_int blocks;
95  u_int fsid;
96  u_int fileid;
97  nfstime atime;
98  nfstime mtime;
99  nfstime ctime;
100 };
101 typedef struct fattr fattr;
102 
103 struct sattr {
104  u_int mode;
105  u_int uid;
106  u_int gid;
107  u_int size;
108  nfstime atime;
109  nfstime mtime;
110 };
111 typedef struct sattr sattr;
112 
113 typedef char *filename;
114 
115 typedef char *nfspath;
116 
117 struct attrstat {
118  nfsstat status;
119  union {
120  fattr attributes;
121  } attrstat_u;
122 };
123 typedef struct attrstat attrstat;
124 
125 struct sattrargs {
126  nfs_fh file;
127  sattr attributes;
128 };
129 typedef struct sattrargs sattrargs;
130 
131 struct diropargs {
132  nfs_fh dir;
133  filename name;
134 };
135 typedef struct diropargs diropargs;
136 
137 struct diropokres {
138  nfs_fh file;
139  fattr attributes;
140 };
141 typedef struct diropokres diropokres;
142 
143 struct diropres {
144  nfsstat status;
145  union {
146  diropokres diropres;
147  } diropres_u;
148 };
149 typedef struct diropres diropres;
150 
151 struct readlinkres {
152  nfsstat status;
153  union {
154  nfspath data;
155  } readlinkres_u;
156 };
157 typedef struct readlinkres readlinkres;
158 
159 struct readargs {
160  nfs_fh file;
161  u_int offset;
162  u_int count;
163  u_int totalcount;
164 };
165 typedef struct readargs readargs;
166 
167 struct readokres {
168  fattr attributes;
169  struct {
170  u_int data_len;
171  char *data_val;
172  } data;
173 };
174 typedef struct readokres readokres;
175 
176 struct readres {
177  nfsstat status;
178  union {
179  readokres reply;
180  } readres_u;
181 };
182 typedef struct readres readres;
183 
184 struct writeargs {
185  nfs_fh file;
186  u_int beginoffset;
187  u_int offset;
188  u_int totalcount;
189  struct {
190  u_int data_len;
191  char *data_val;
192  } data;
193 };
194 typedef struct writeargs writeargs;
195 
196 struct createargs {
197  diropargs where;
198  sattr attributes;
199 };
200 typedef struct createargs createargs;
201 
202 struct renameargs {
203  diropargs from;
204  diropargs to;
205 };
206 typedef struct renameargs renameargs;
207 
208 struct linkargs {
209  nfs_fh from;
210  diropargs to;
211 };
212 typedef struct linkargs linkargs;
213 
214 struct symlinkargs {
215  diropargs from;
216  nfspath to;
217  sattr attributes;
218 };
219 typedef struct symlinkargs symlinkargs;
220 
221 struct nfscookie {
222  char data[NFS_COOKIESIZE];
223 };
224 typedef struct nfscookie nfscookie;
225 
226 struct readdirargs {
227  nfs_fh dir;
228  nfscookie cookie;
229  u_int count;
230 };
231 typedef struct readdirargs readdirargs;
232 
233 struct entry {
234  u_int fileid;
235  filename name;
236  nfscookie cookie;
237  struct entry *nextentry;
238 };
239 typedef struct entry entry;
240 
241 struct dirlist {
242  entry *entries;
243  bool_t eof;
244 };
245 typedef struct dirlist dirlist;
246 
247 struct readdirres {
248  nfsstat status;
249  union {
250  dirlist reply;
251  } readdirres_u;
252 };
253 typedef struct readdirres readdirres;
254 
255 struct statfsokres {
256  u_int tsize;
257  u_int bsize;
258  u_int blocks;
259  u_int bfree;
260  u_int bavail;
261 };
262 typedef struct statfsokres statfsokres;
263 
264 struct statfsres {
265  nfsstat status;
266  union {
267  statfsokres reply;
268  } statfsres_u;
269 };
270 typedef struct statfsres statfsres;
271 
272 #define NFS_PROGRAM 100003
273 #define NFS_VERSION 2
274 
275 #if defined(__STDC__) || defined(__cplusplus)
276 #define NFSPROC_NULL 0
277 extern void * nfsproc_null_2(void *, CLIENT *);
278 extern void * nfsproc_null_2_svc(void *, struct svc_req *);
279 #define NFSPROC_GETATTR 1
280 extern attrstat * nfsproc_getattr_2(nfs_fh *, CLIENT *);
281 extern attrstat * nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
282 #define NFSPROC_SETATTR 2
283 extern attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *);
284 extern attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *);
285 #define NFSPROC_ROOT 3
286 extern void * nfsproc_root_2(void *, CLIENT *);
287 extern void * nfsproc_root_2_svc(void *, struct svc_req *);
288 #define NFSPROC_LOOKUP 4
289 extern diropres * nfsproc_lookup_2(diropargs *, CLIENT *);
290 extern diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *);
291 #define NFSPROC_READLINK 5
292 extern readlinkres * nfsproc_readlink_2(nfs_fh *, CLIENT *);
293 extern readlinkres * nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
294 #define NFSPROC_READ 6
295 extern readres * nfsproc_read_2(readargs *, CLIENT *);
296 extern readres * nfsproc_read_2_svc(readargs *, struct svc_req *);
297 #define NFSPROC_WRITECACHE 7
298 extern void * nfsproc_writecache_2(void *, CLIENT *);
299 extern void * nfsproc_writecache_2_svc(void *, struct svc_req *);
300 #define NFSPROC_WRITE 8
301 extern attrstat * nfsproc_write_2(writeargs *, CLIENT *);
302 extern attrstat * nfsproc_write_2_svc(writeargs *, struct svc_req *);
303 #define NFSPROC_CREATE 9
304 extern diropres * nfsproc_create_2(createargs *, CLIENT *);
305 extern diropres * nfsproc_create_2_svc(createargs *, struct svc_req *);
306 #define NFSPROC_REMOVE 10
307 extern nfsstat * nfsproc_remove_2(diropargs *, CLIENT *);
308 extern nfsstat * nfsproc_remove_2_svc(diropargs *, struct svc_req *);
309 #define NFSPROC_RENAME 11
310 extern nfsstat * nfsproc_rename_2(renameargs *, CLIENT *);
311 extern nfsstat * nfsproc_rename_2_svc(renameargs *, struct svc_req *);
312 #define NFSPROC_LINK 12
313 extern nfsstat * nfsproc_link_2(linkargs *, CLIENT *);
314 extern nfsstat * nfsproc_link_2_svc(linkargs *, struct svc_req *);
315 #define NFSPROC_SYMLINK 13
316 extern nfsstat * nfsproc_symlink_2(symlinkargs *, CLIENT *);
317 extern nfsstat * nfsproc_symlink_2_svc(symlinkargs *, struct svc_req *);
318 #define NFSPROC_MKDIR 14
319 extern diropres * nfsproc_mkdir_2(createargs *, CLIENT *);
320 extern diropres * nfsproc_mkdir_2_svc(createargs *, struct svc_req *);
321 #define NFSPROC_RMDIR 15
322 extern nfsstat * nfsproc_rmdir_2(diropargs *, CLIENT *);
323 extern nfsstat * nfsproc_rmdir_2_svc(diropargs *, struct svc_req *);
324 #define NFSPROC_READDIR 16
325 extern readdirres * nfsproc_readdir_2(readdirargs *, CLIENT *);
326 extern readdirres * nfsproc_readdir_2_svc(readdirargs *, struct svc_req *);
327 #define NFSPROC_STATFS 17
328 extern statfsres * nfsproc_statfs_2(nfs_fh *, CLIENT *);
329 extern statfsres * nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
330 extern int nfs_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
331 
332 #else /* K&R C */
333 #define NFSPROC_NULL 0
334 extern void * nfsproc_null_2();
335 extern void * nfsproc_null_2_svc();
336 #define NFSPROC_GETATTR 1
337 extern attrstat * nfsproc_getattr_2();
338 extern attrstat * nfsproc_getattr_2_svc();
339 #define NFSPROC_SETATTR 2
340 extern attrstat * nfsproc_setattr_2();
341 extern attrstat * nfsproc_setattr_2_svc();
342 #define NFSPROC_ROOT 3
343 extern void * nfsproc_root_2();
344 extern void * nfsproc_root_2_svc();
345 #define NFSPROC_LOOKUP 4
346 extern diropres * nfsproc_lookup_2();
347 extern diropres * nfsproc_lookup_2_svc();
348 #define NFSPROC_READLINK 5
349 extern readlinkres * nfsproc_readlink_2();
350 extern readlinkres * nfsproc_readlink_2_svc();
351 #define NFSPROC_READ 6
352 extern readres * nfsproc_read_2();
353 extern readres * nfsproc_read_2_svc();
354 #define NFSPROC_WRITECACHE 7
355 extern void * nfsproc_writecache_2();
356 extern void * nfsproc_writecache_2_svc();
357 #define NFSPROC_WRITE 8
358 extern attrstat * nfsproc_write_2();
359 extern attrstat * nfsproc_write_2_svc();
360 #define NFSPROC_CREATE 9
361 extern diropres * nfsproc_create_2();
362 extern diropres * nfsproc_create_2_svc();
363 #define NFSPROC_REMOVE 10
364 extern nfsstat * nfsproc_remove_2();
365 extern nfsstat * nfsproc_remove_2_svc();
366 #define NFSPROC_RENAME 11
367 extern nfsstat * nfsproc_rename_2();
368 extern nfsstat * nfsproc_rename_2_svc();
369 #define NFSPROC_LINK 12
370 extern nfsstat * nfsproc_link_2();
371 extern nfsstat * nfsproc_link_2_svc();
372 #define NFSPROC_SYMLINK 13
373 extern nfsstat * nfsproc_symlink_2();
374 extern nfsstat * nfsproc_symlink_2_svc();
375 #define NFSPROC_MKDIR 14
376 extern diropres * nfsproc_mkdir_2();
377 extern diropres * nfsproc_mkdir_2_svc();
378 #define NFSPROC_RMDIR 15
379 extern nfsstat * nfsproc_rmdir_2();
380 extern nfsstat * nfsproc_rmdir_2_svc();
381 #define NFSPROC_READDIR 16
382 extern readdirres * nfsproc_readdir_2();
383 extern readdirres * nfsproc_readdir_2_svc();
384 #define NFSPROC_STATFS 17
385 extern statfsres * nfsproc_statfs_2();
386 extern statfsres * nfsproc_statfs_2_svc();
387 extern int nfs_program_2_freeresult ();
388 #endif /* K&R C */
389 
390 /* the xdr functions */
391 
392 #if defined(__STDC__) || defined(__cplusplus)
393 extern bool_t xdr_nfsstat (XDR *, nfsstat*);
394 extern bool_t xdr_ftype (XDR *, ftype*);
395 extern bool_t xdr_nfs_fh (XDR *, nfs_fh*);
396 extern bool_t xdr_nfstime (XDR *, nfstime*);
397 extern bool_t xdr_fattr (XDR *, fattr*);
398 extern bool_t xdr_sattr (XDR *, sattr*);
399 extern bool_t xdr_filename (XDR *, filename*);
400 extern bool_t xdr_nfspath (XDR *, nfspath*);
401 extern bool_t xdr_attrstat (XDR *, attrstat*);
402 extern bool_t xdr_sattrargs (XDR *, sattrargs*);
403 extern bool_t xdr_diropargs (XDR *, diropargs*);
404 extern bool_t xdr_diropokres (XDR *, diropokres*);
405 extern bool_t xdr_diropres (XDR *, diropres*);
406 extern bool_t xdr_readlinkres (XDR *, readlinkres*);
407 extern bool_t xdr_readargs (XDR *, readargs*);
408 extern bool_t xdr_readokres (XDR *, readokres*);
409 extern bool_t xdr_readres (XDR *, readres*);
410 extern bool_t xdr_writeargs (XDR *, writeargs*);
411 extern bool_t xdr_createargs (XDR *, createargs*);
412 extern bool_t xdr_renameargs (XDR *, renameargs*);
413 extern bool_t xdr_linkargs (XDR *, linkargs*);
414 extern bool_t xdr_symlinkargs (XDR *, symlinkargs*);
415 extern bool_t xdr_nfscookie (XDR *, nfscookie*);
416 extern bool_t xdr_readdirargs (XDR *, readdirargs*);
417 extern bool_t xdr_entry (XDR *, entry*);
418 extern bool_t xdr_dirlist (XDR *, dirlist*);
419 extern bool_t xdr_readdirres (XDR *, readdirres*);
420 extern bool_t xdr_statfsokres (XDR *, statfsokres*);
421 extern bool_t xdr_statfsres (XDR *, statfsres*);
422 
423 #else /* K&R C */
424 extern bool_t xdr_nfsstat ();
425 extern bool_t xdr_ftype ();
426 extern bool_t xdr_nfs_fh ();
427 extern bool_t xdr_nfstime ();
428 extern bool_t xdr_fattr ();
429 extern bool_t xdr_sattr ();
430 extern bool_t xdr_filename ();
431 extern bool_t xdr_nfspath ();
432 extern bool_t xdr_attrstat ();
433 extern bool_t xdr_sattrargs ();
434 extern bool_t xdr_diropargs ();
435 extern bool_t xdr_diropokres ();
436 extern bool_t xdr_diropres ();
437 extern bool_t xdr_readlinkres ();
438 extern bool_t xdr_readargs ();
439 extern bool_t xdr_readokres ();
440 extern bool_t xdr_readres ();
441 extern bool_t xdr_writeargs ();
442 extern bool_t xdr_createargs ();
443 extern bool_t xdr_renameargs ();
444 extern bool_t xdr_linkargs ();
445 extern bool_t xdr_symlinkargs ();
446 extern bool_t xdr_nfscookie ();
447 extern bool_t xdr_readdirargs ();
448 extern bool_t xdr_entry ();
449 extern bool_t xdr_dirlist ();
450 extern bool_t xdr_readdirres ();
451 extern bool_t xdr_statfsokres ();
452 extern bool_t xdr_statfsres ();
453 
454 #endif /* K&R C */
455 
456 #ifdef __cplusplus
457 }
458 #endif
459 
460 #endif /* !_NFS_PROT_H_RPCGEN */
Definition: nfs_prot.h:176
Definition: nfs_prot.h:103
Definition: nfs_prot.h:74
Definition: nfs_prot.h:214
Definition: nfs_prot.h:226
Definition: nfs_prot.h:143
Definition: nfs_prot.h:125
Definition: nfs_prot.h:202
Definition: nfs_prot.h:255
Definition: nfs_prot.h:85
Definition: nfs_prot.h:184
Definition: nfs_prot.h:131
Definition: nfs_prot.h:247
Definition: nfs_prot.h:221
Definition: nfs_prot.h:137
Definition: nfs_prot.h:196
Definition: nfs_prot.h:151
Definition: nfs_prot.h:208
Definition: nfs_prot.h:167
Definition: nfs_prot.h:159
Definition: nfs_prot.h:117
Definition: nfs_prot.h:264
Definition: mmu-config.c:39
unsigned size
Definition: tte.h:74
Definition: nfs_prot.h:79
Definition: nfs_prot.h:241
Definition: mongoose.c:442