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
214typedef char nfscookie[NFS_COOKIESIZE];
215
216struct readdirargs {
217	nfs_fh dir;
218	nfscookie cookie;
219	u_int count;
220};
221typedef struct readdirargs readdirargs;
222
223struct entry {
224	u_int fileid;
225	filename name;
226	nfscookie cookie;
227	struct entry *nextentry;
228};
229typedef struct entry entry;
230
231struct dirlist {
232	entry *entries;
233	bool_t eof;
234};
235typedef struct dirlist dirlist;
236
237struct readdirres {
238	nfsstat status;
239	union {
240		dirlist reply;
241	} readdirres_u;
242};
243typedef struct readdirres readdirres;
244
245struct statfsokres {
246	u_int tsize;
247	u_int bsize;
248	u_int blocks;
249	u_int bfree;
250	u_int bavail;
251};
252typedef struct statfsokres statfsokres;
253
254struct statfsres {
255	nfsstat status;
256	union {
257		statfsokres reply;
258	} statfsres_u;
259};
260typedef struct statfsres statfsres;
261
262#define NFS_PROGRAM 100003
263#define NFS_VERSION 2
264
265#if defined(__STDC__) || defined(__cplusplus)
266#define NFSPROC_NULL 0
267extern  void * nfsproc_null_2(void *, CLIENT *);
268extern  void * nfsproc_null_2_svc(void *, struct svc_req *);
269#define NFSPROC_GETATTR 1
270extern  attrstat * nfsproc_getattr_2(nfs_fh *, CLIENT *);
271extern  attrstat * nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
272#define NFSPROC_SETATTR 2
273extern  attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *);
274extern  attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *);
275#define NFSPROC_ROOT 3
276extern  void * nfsproc_root_2(void *, CLIENT *);
277extern  void * nfsproc_root_2_svc(void *, struct svc_req *);
278#define NFSPROC_LOOKUP 4
279extern  diropres * nfsproc_lookup_2(diropargs *, CLIENT *);
280extern  diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *);
281#define NFSPROC_READLINK 5
282extern  readlinkres * nfsproc_readlink_2(nfs_fh *, CLIENT *);
283extern  readlinkres * nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
284#define NFSPROC_READ 6
285extern  readres * nfsproc_read_2(readargs *, CLIENT *);
286extern  readres * nfsproc_read_2_svc(readargs *, struct svc_req *);
287#define NFSPROC_WRITECACHE 7
288extern  void * nfsproc_writecache_2(void *, CLIENT *);
289extern  void * nfsproc_writecache_2_svc(void *, struct svc_req *);
290#define NFSPROC_WRITE 8
291extern  attrstat * nfsproc_write_2(writeargs *, CLIENT *);
292extern  attrstat * nfsproc_write_2_svc(writeargs *, struct svc_req *);
293#define NFSPROC_CREATE 9
294extern  diropres * nfsproc_create_2(createargs *, CLIENT *);
295extern  diropres * nfsproc_create_2_svc(createargs *, struct svc_req *);
296#define NFSPROC_REMOVE 10
297extern  nfsstat * nfsproc_remove_2(diropargs *, CLIENT *);
298extern  nfsstat * nfsproc_remove_2_svc(diropargs *, struct svc_req *);
299#define NFSPROC_RENAME 11
300extern  nfsstat * nfsproc_rename_2(renameargs *, CLIENT *);
301extern  nfsstat * nfsproc_rename_2_svc(renameargs *, struct svc_req *);
302#define NFSPROC_LINK 12
303extern  nfsstat * nfsproc_link_2(linkargs *, CLIENT *);
304extern  nfsstat * nfsproc_link_2_svc(linkargs *, struct svc_req *);
305#define NFSPROC_SYMLINK 13
306extern  nfsstat * nfsproc_symlink_2(symlinkargs *, CLIENT *);
307extern  nfsstat * nfsproc_symlink_2_svc(symlinkargs *, struct svc_req *);
308#define NFSPROC_MKDIR 14
309extern  diropres * nfsproc_mkdir_2(createargs *, CLIENT *);
310extern  diropres * nfsproc_mkdir_2_svc(createargs *, struct svc_req *);
311#define NFSPROC_RMDIR 15
312extern  nfsstat * nfsproc_rmdir_2(diropargs *, CLIENT *);
313extern  nfsstat * nfsproc_rmdir_2_svc(diropargs *, struct svc_req *);
314#define NFSPROC_READDIR 16
315extern  readdirres * nfsproc_readdir_2(readdirargs *, CLIENT *);
316extern  readdirres * nfsproc_readdir_2_svc(readdirargs *, struct svc_req *);
317#define NFSPROC_STATFS 17
318extern  statfsres * nfsproc_statfs_2(nfs_fh *, CLIENT *);
319extern  statfsres * nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
320extern int nfs_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
321
322#else /* K&R C */
323#define NFSPROC_NULL 0
324extern  void * nfsproc_null_2();
325extern  void * nfsproc_null_2_svc();
326#define NFSPROC_GETATTR 1
327extern  attrstat * nfsproc_getattr_2();
328extern  attrstat * nfsproc_getattr_2_svc();
329#define NFSPROC_SETATTR 2
330extern  attrstat * nfsproc_setattr_2();
331extern  attrstat * nfsproc_setattr_2_svc();
332#define NFSPROC_ROOT 3
333extern  void * nfsproc_root_2();
334extern  void * nfsproc_root_2_svc();
335#define NFSPROC_LOOKUP 4
336extern  diropres * nfsproc_lookup_2();
337extern  diropres * nfsproc_lookup_2_svc();
338#define NFSPROC_READLINK 5
339extern  readlinkres * nfsproc_readlink_2();
340extern  readlinkres * nfsproc_readlink_2_svc();
341#define NFSPROC_READ 6
342extern  readres * nfsproc_read_2();
343extern  readres * nfsproc_read_2_svc();
344#define NFSPROC_WRITECACHE 7
345extern  void * nfsproc_writecache_2();
346extern  void * nfsproc_writecache_2_svc();
347#define NFSPROC_WRITE 8
348extern  attrstat * nfsproc_write_2();
349extern  attrstat * nfsproc_write_2_svc();
350#define NFSPROC_CREATE 9
351extern  diropres * nfsproc_create_2();
352extern  diropres * nfsproc_create_2_svc();
353#define NFSPROC_REMOVE 10
354extern  nfsstat * nfsproc_remove_2();
355extern  nfsstat * nfsproc_remove_2_svc();
356#define NFSPROC_RENAME 11
357extern  nfsstat * nfsproc_rename_2();
358extern  nfsstat * nfsproc_rename_2_svc();
359#define NFSPROC_LINK 12
360extern  nfsstat * nfsproc_link_2();
361extern  nfsstat * nfsproc_link_2_svc();
362#define NFSPROC_SYMLINK 13
363extern  nfsstat * nfsproc_symlink_2();
364extern  nfsstat * nfsproc_symlink_2_svc();
365#define NFSPROC_MKDIR 14
366extern  diropres * nfsproc_mkdir_2();
367extern  diropres * nfsproc_mkdir_2_svc();
368#define NFSPROC_RMDIR 15
369extern  nfsstat * nfsproc_rmdir_2();
370extern  nfsstat * nfsproc_rmdir_2_svc();
371#define NFSPROC_READDIR 16
372extern  readdirres * nfsproc_readdir_2();
373extern  readdirres * nfsproc_readdir_2_svc();
374#define NFSPROC_STATFS 17
375extern  statfsres * nfsproc_statfs_2();
376extern  statfsres * nfsproc_statfs_2_svc();
377extern int nfs_program_2_freeresult ();
378#endif /* K&R C */
379
380/* the xdr functions */
381
382#if defined(__STDC__) || defined(__cplusplus)
383extern  bool_t xdr_nfsstat (XDR *, nfsstat*);
384extern  bool_t xdr_ftype (XDR *, ftype*);
385extern  bool_t xdr_nfs_fh (XDR *, nfs_fh*);
386extern  bool_t xdr_nfstime (XDR *, nfstime*);
387extern  bool_t xdr_fattr (XDR *, fattr*);
388extern  bool_t xdr_sattr (XDR *, sattr*);
389extern  bool_t xdr_filename (XDR *, filename*);
390extern  bool_t xdr_nfspath (XDR *, nfspath*);
391extern  bool_t xdr_attrstat (XDR *, attrstat*);
392extern  bool_t xdr_sattrargs (XDR *, sattrargs*);
393extern  bool_t xdr_diropargs (XDR *, diropargs*);
394extern  bool_t xdr_diropokres (XDR *, diropokres*);
395extern  bool_t xdr_diropres (XDR *, diropres*);
396extern  bool_t xdr_readlinkres (XDR *, readlinkres*);
397extern  bool_t xdr_readargs (XDR *, readargs*);
398extern  bool_t xdr_readokres (XDR *, readokres*);
399extern  bool_t xdr_readres (XDR *, readres*);
400extern  bool_t xdr_writeargs (XDR *, writeargs*);
401extern  bool_t xdr_createargs (XDR *, createargs*);
402extern  bool_t xdr_renameargs (XDR *, renameargs*);
403extern  bool_t xdr_linkargs (XDR *, linkargs*);
404extern  bool_t xdr_symlinkargs (XDR *, symlinkargs*);
405extern  bool_t xdr_nfscookie (XDR *, nfscookie);
406extern  bool_t xdr_readdirargs (XDR *, readdirargs*);
407extern  bool_t xdr_entry (XDR *, entry*);
408extern  bool_t xdr_dirlist (XDR *, dirlist*);
409extern  bool_t xdr_readdirres (XDR *, readdirres*);
410extern  bool_t xdr_statfsokres (XDR *, statfsokres*);
411extern  bool_t xdr_statfsres (XDR *, statfsres*);
412
413#else /* K&R C */
414extern bool_t xdr_nfsstat ();
415extern bool_t xdr_ftype ();
416extern bool_t xdr_nfs_fh ();
417extern bool_t xdr_nfstime ();
418extern bool_t xdr_fattr ();
419extern bool_t xdr_sattr ();
420extern bool_t xdr_filename ();
421extern bool_t xdr_nfspath ();
422extern bool_t xdr_attrstat ();
423extern bool_t xdr_sattrargs ();
424extern bool_t xdr_diropargs ();
425extern bool_t xdr_diropokres ();
426extern bool_t xdr_diropres ();
427extern bool_t xdr_readlinkres ();
428extern bool_t xdr_readargs ();
429extern bool_t xdr_readokres ();
430extern bool_t xdr_readres ();
431extern bool_t xdr_writeargs ();
432extern bool_t xdr_createargs ();
433extern bool_t xdr_renameargs ();
434extern bool_t xdr_linkargs ();
435extern bool_t xdr_symlinkargs ();
436extern bool_t xdr_nfscookie ();
437extern bool_t xdr_readdirargs ();
438extern bool_t xdr_entry ();
439extern bool_t xdr_dirlist ();
440extern bool_t xdr_readdirres ();
441extern bool_t xdr_statfsokres ();
442extern bool_t xdr_statfsres ();
443
444#endif /* K&R C */
445
446#ifdef __cplusplus
447}
448#endif
449
450#endif /* !_NFS_PROT_H_RPCGEN */
451