source: rtems/cpukit/libfs/src/nfsclient/proto/nfs_prot.h @ 58d38a0

4.104.114.95
Last change on this file since 58d38a0 was 58d38a0, checked in by Joel Sherrill <joel.sherrill@…>, on 02/26/08 at 19:23:53

2008-02-26 Joel Sherrill <joel.sherrill@…>

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