RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
18extern "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
37enum 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};
58typedef enum nfsstat nfsstat;
59
60enum 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};
72typedef enum ftype ftype;
73
74struct nfs_fh {
75 char data[NFS_FHSIZE];
76};
77typedef struct nfs_fh nfs_fh;
78
79struct nfstime {
80 u_int seconds;
81 u_int useconds;
82};
83typedef struct nfstime nfstime;
84
85struct 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};
101typedef struct fattr fattr;
102
103struct sattr {
104 u_int mode;
105 u_int uid;
106 u_int gid;
107 u_int size;
108 nfstime atime;
109 nfstime mtime;
110};
111typedef struct sattr sattr;
112
113typedef char *filename;
114
115typedef char *nfspath;
116
117struct attrstat {
118 nfsstat status;
119 union {
120 fattr attributes;
121 } attrstat_u;
122};
123typedef struct attrstat attrstat;
124
125struct sattrargs {
126 nfs_fh file;
127 sattr attributes;
128};
129typedef struct sattrargs sattrargs;
130
131struct diropargs {
132 nfs_fh dir;
133 filename name;
134};
135typedef struct diropargs diropargs;
136
138 nfs_fh file;
139 fattr attributes;
140};
141typedef struct diropokres diropokres;
142
143struct diropres {
144 nfsstat status;
145 union {
147 } diropres_u;
148};
149typedef struct diropres diropres;
150
152 nfsstat status;
153 union {
154 nfspath data;
155 } readlinkres_u;
156};
157typedef struct readlinkres readlinkres;
158
159struct readargs {
160 nfs_fh file;
161 u_int offset;
162 u_int count;
163 u_int totalcount;
164};
165typedef struct readargs readargs;
166
167struct readokres {
168 fattr attributes;
169 struct {
170 u_int data_len;
171 char *data_val;
172 } data;
173};
174typedef struct readokres readokres;
175
176struct readres {
177 nfsstat status;
178 union {
179 readokres reply;
180 } readres_u;
181};
182typedef struct readres readres;
183
184struct 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};
194typedef struct writeargs writeargs;
195
197 diropargs where;
198 sattr attributes;
199};
200typedef struct createargs createargs;
201
203 diropargs from;
204 diropargs to;
205};
206typedef struct renameargs renameargs;
207
208struct linkargs {
209 nfs_fh from;
210 diropargs to;
211};
212typedef struct linkargs linkargs;
213
215 diropargs from;
216 nfspath to;
217 sattr attributes;
218};
219typedef struct symlinkargs symlinkargs;
220
221struct nfscookie {
222 char data[NFS_COOKIESIZE];
223};
224typedef struct nfscookie nfscookie;
225
227 nfs_fh dir;
228 nfscookie cookie;
229 u_int count;
230};
231typedef struct readdirargs readdirargs;
232
233struct entry {
234 u_int fileid;
235 filename name;
236 nfscookie cookie;
237 struct entry *nextentry;
238};
239typedef struct entry entry;
240
241struct dirlist {
242 entry *entries;
243 bool_t eof;
244};
245typedef struct dirlist dirlist;
246
248 nfsstat status;
249 union {
250 dirlist reply;
251 } readdirres_u;
252};
253typedef struct readdirres readdirres;
254
256 u_int tsize;
257 u_int bsize;
258 u_int blocks;
259 u_int bfree;
260 u_int bavail;
261};
262typedef struct statfsokres statfsokres;
263
264struct statfsres {
265 nfsstat status;
266 union {
267 statfsokres reply;
268 } statfsres_u;
269};
270typedef 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
277extern void * nfsproc_null_2(void *, CLIENT *);
278extern void * nfsproc_null_2_svc(void *, struct svc_req *);
279#define NFSPROC_GETATTR 1
280extern attrstat * nfsproc_getattr_2(nfs_fh *, CLIENT *);
281extern attrstat * nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
282#define NFSPROC_SETATTR 2
283extern attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *);
284extern attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *);
285#define NFSPROC_ROOT 3
286extern void * nfsproc_root_2(void *, CLIENT *);
287extern void * nfsproc_root_2_svc(void *, struct svc_req *);
288#define NFSPROC_LOOKUP 4
289extern diropres * nfsproc_lookup_2(diropargs *, CLIENT *);
290extern diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *);
291#define NFSPROC_READLINK 5
292extern readlinkres * nfsproc_readlink_2(nfs_fh *, CLIENT *);
293extern readlinkres * nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
294#define NFSPROC_READ 6
295extern readres * nfsproc_read_2(readargs *, CLIENT *);
296extern readres * nfsproc_read_2_svc(readargs *, struct svc_req *);
297#define NFSPROC_WRITECACHE 7
298extern void * nfsproc_writecache_2(void *, CLIENT *);
299extern void * nfsproc_writecache_2_svc(void *, struct svc_req *);
300#define NFSPROC_WRITE 8
301extern attrstat * nfsproc_write_2(writeargs *, CLIENT *);
302extern attrstat * nfsproc_write_2_svc(writeargs *, struct svc_req *);
303#define NFSPROC_CREATE 9
304extern diropres * nfsproc_create_2(createargs *, CLIENT *);
305extern diropres * nfsproc_create_2_svc(createargs *, struct svc_req *);
306#define NFSPROC_REMOVE 10
307extern nfsstat * nfsproc_remove_2(diropargs *, CLIENT *);
308extern nfsstat * nfsproc_remove_2_svc(diropargs *, struct svc_req *);
309#define NFSPROC_RENAME 11
310extern nfsstat * nfsproc_rename_2(renameargs *, CLIENT *);
311extern nfsstat * nfsproc_rename_2_svc(renameargs *, struct svc_req *);
312#define NFSPROC_LINK 12
313extern nfsstat * nfsproc_link_2(linkargs *, CLIENT *);
314extern nfsstat * nfsproc_link_2_svc(linkargs *, struct svc_req *);
315#define NFSPROC_SYMLINK 13
316extern nfsstat * nfsproc_symlink_2(symlinkargs *, CLIENT *);
317extern nfsstat * nfsproc_symlink_2_svc(symlinkargs *, struct svc_req *);
318#define NFSPROC_MKDIR 14
319extern diropres * nfsproc_mkdir_2(createargs *, CLIENT *);
320extern diropres * nfsproc_mkdir_2_svc(createargs *, struct svc_req *);
321#define NFSPROC_RMDIR 15
322extern nfsstat * nfsproc_rmdir_2(diropargs *, CLIENT *);
323extern nfsstat * nfsproc_rmdir_2_svc(diropargs *, struct svc_req *);
324#define NFSPROC_READDIR 16
325extern readdirres * nfsproc_readdir_2(readdirargs *, CLIENT *);
326extern readdirres * nfsproc_readdir_2_svc(readdirargs *, struct svc_req *);
327#define NFSPROC_STATFS 17
328extern statfsres * nfsproc_statfs_2(nfs_fh *, CLIENT *);
329extern statfsres * nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
330extern int nfs_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
331
332#else /* K&R C */
333#define NFSPROC_NULL 0
334extern void * nfsproc_null_2();
335extern void * nfsproc_null_2_svc();
336#define NFSPROC_GETATTR 1
337extern attrstat * nfsproc_getattr_2();
338extern attrstat * nfsproc_getattr_2_svc();
339#define NFSPROC_SETATTR 2
340extern attrstat * nfsproc_setattr_2();
341extern attrstat * nfsproc_setattr_2_svc();
342#define NFSPROC_ROOT 3
343extern void * nfsproc_root_2();
344extern void * nfsproc_root_2_svc();
345#define NFSPROC_LOOKUP 4
346extern diropres * nfsproc_lookup_2();
347extern diropres * nfsproc_lookup_2_svc();
348#define NFSPROC_READLINK 5
349extern readlinkres * nfsproc_readlink_2();
350extern readlinkres * nfsproc_readlink_2_svc();
351#define NFSPROC_READ 6
352extern readres * nfsproc_read_2();
353extern readres * nfsproc_read_2_svc();
354#define NFSPROC_WRITECACHE 7
355extern void * nfsproc_writecache_2();
356extern void * nfsproc_writecache_2_svc();
357#define NFSPROC_WRITE 8
358extern attrstat * nfsproc_write_2();
359extern attrstat * nfsproc_write_2_svc();
360#define NFSPROC_CREATE 9
361extern diropres * nfsproc_create_2();
362extern diropres * nfsproc_create_2_svc();
363#define NFSPROC_REMOVE 10
364extern nfsstat * nfsproc_remove_2();
365extern nfsstat * nfsproc_remove_2_svc();
366#define NFSPROC_RENAME 11
367extern nfsstat * nfsproc_rename_2();
368extern nfsstat * nfsproc_rename_2_svc();
369#define NFSPROC_LINK 12
370extern nfsstat * nfsproc_link_2();
371extern nfsstat * nfsproc_link_2_svc();
372#define NFSPROC_SYMLINK 13
373extern nfsstat * nfsproc_symlink_2();
374extern nfsstat * nfsproc_symlink_2_svc();
375#define NFSPROC_MKDIR 14
376extern diropres * nfsproc_mkdir_2();
377extern diropres * nfsproc_mkdir_2_svc();
378#define NFSPROC_RMDIR 15
379extern nfsstat * nfsproc_rmdir_2();
380extern nfsstat * nfsproc_rmdir_2_svc();
381#define NFSPROC_READDIR 16
382extern readdirres * nfsproc_readdir_2();
383extern readdirres * nfsproc_readdir_2_svc();
384#define NFSPROC_STATFS 17
385extern statfsres * nfsproc_statfs_2();
386extern statfsres * nfsproc_statfs_2_svc();
387extern int nfs_program_2_freeresult ();
388#endif /* K&R C */
389
390/* the xdr functions */
391
392#if defined(__STDC__) || defined(__cplusplus)
393extern bool_t xdr_nfsstat (XDR *, nfsstat*);
394extern bool_t xdr_ftype (XDR *, ftype*);
395extern bool_t xdr_nfs_fh (XDR *, nfs_fh*);
396extern bool_t xdr_nfstime (XDR *, nfstime*);
397extern bool_t xdr_fattr (XDR *, fattr*);
398extern bool_t xdr_sattr (XDR *, sattr*);
399extern bool_t xdr_filename (XDR *, filename*);
400extern bool_t xdr_nfspath (XDR *, nfspath*);
401extern bool_t xdr_attrstat (XDR *, attrstat*);
402extern bool_t xdr_sattrargs (XDR *, sattrargs*);
403extern bool_t xdr_diropargs (XDR *, diropargs*);
404extern bool_t xdr_diropokres (XDR *, diropokres*);
405extern bool_t xdr_diropres (XDR *, diropres*);
406extern bool_t xdr_readlinkres (XDR *, readlinkres*);
407extern bool_t xdr_readargs (XDR *, readargs*);
408extern bool_t xdr_readokres (XDR *, readokres*);
409extern bool_t xdr_readres (XDR *, readres*);
410extern bool_t xdr_writeargs (XDR *, writeargs*);
411extern bool_t xdr_createargs (XDR *, createargs*);
412extern bool_t xdr_renameargs (XDR *, renameargs*);
413extern bool_t xdr_linkargs (XDR *, linkargs*);
414extern bool_t xdr_symlinkargs (XDR *, symlinkargs*);
415extern bool_t xdr_nfscookie (XDR *, nfscookie*);
416extern bool_t xdr_readdirargs (XDR *, readdirargs*);
417extern bool_t xdr_entry (XDR *, entry*);
418extern bool_t xdr_dirlist (XDR *, dirlist*);
419extern bool_t xdr_readdirres (XDR *, readdirres*);
420extern bool_t xdr_statfsokres (XDR *, statfsokres*);
421extern bool_t xdr_statfsres (XDR *, statfsres*);
422
423#else /* K&R C */
424extern bool_t xdr_nfsstat ();
425extern bool_t xdr_ftype ();
426extern bool_t xdr_nfs_fh ();
427extern bool_t xdr_nfstime ();
428extern bool_t xdr_fattr ();
429extern bool_t xdr_sattr ();
430extern bool_t xdr_filename ();
431extern bool_t xdr_nfspath ();
432extern bool_t xdr_attrstat ();
433extern bool_t xdr_sattrargs ();
434extern bool_t xdr_diropargs ();
435extern bool_t xdr_diropokres ();
436extern bool_t xdr_diropres ();
437extern bool_t xdr_readlinkres ();
438extern bool_t xdr_readargs ();
439extern bool_t xdr_readokres ();
440extern bool_t xdr_readres ();
441extern bool_t xdr_writeargs ();
442extern bool_t xdr_createargs ();
443extern bool_t xdr_renameargs ();
444extern bool_t xdr_linkargs ();
445extern bool_t xdr_symlinkargs ();
446extern bool_t xdr_nfscookie ();
447extern bool_t xdr_readdirargs ();
448extern bool_t xdr_entry ();
449extern bool_t xdr_dirlist ();
450extern bool_t xdr_readdirres ();
451extern bool_t xdr_statfsokres ();
452extern bool_t xdr_statfsres ();
453
454#endif /* K&R C */
455
456#ifdef __cplusplus
457}
458#endif
460#endif /* !_NFS_PROT_H_RPCGEN */
Definition: nfs_prot.h:117
Definition: nfs_prot.h:196
Definition: nfs_prot.h:241
Definition: nfs_prot.h:131
Definition: nfs_prot.h:137
Definition: nfs_prot.h:143
Definition: mmu-config.c:40
Definition: nfs_prot.h:85
Definition: mongoose.c:442
Definition: nfs_prot.h:208
Definition: nfs_prot.h:74
Definition: nfs_prot.h:221
Definition: nfs_prot.h:79
Definition: nfs_prot.h:159
Definition: nfs_prot.h:226
Definition: nfs_prot.h:247
Definition: nfs_prot.h:151
Definition: nfs_prot.h:167
Definition: nfs_prot.h:176
Definition: nfs_prot.h:202
Definition: nfs_prot.h:103
Definition: nfs_prot.h:125
Definition: nfs_prot.h:255
Definition: nfs_prot.h:264
Definition: nfs_prot.h:214
Definition: nfs_prot.h:184