xref: /netbsd-src/external/bsd/am-utils/dist/conf/nfs_prot/nfs_prot_nextstep.h (revision 274254cdae52594c1aa480a736aef78313d15c9c)
1 /*	$NetBSD: nfs_prot_nextstep.h,v 1.1.1.2 2009/03/20 20:26:51 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 1997-2009 Erez Zadok
5  * Copyright (c) 1990 Jan-Simon Pendry
6  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
7  * Copyright (c) 1990 The Regents of the University of California.
8  * All rights reserved.
9  *
10  * This code is derived from software contributed to Berkeley by
11  * Jan-Simon Pendry at Imperial College, London.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 1. Redistributions of source code must retain the above copyright
17  *    notice, this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright
19  *    notice, this list of conditions and the following disclaimer in the
20  *    documentation and/or other materials provided with the distribution.
21  * 3. All advertising materials mentioning features or use of this software
22  *    must display the following acknowledgment:
23  *      This product includes software developed by the University of
24  *      California, Berkeley and its contributors.
25  * 4. Neither the name of the University nor the names of its contributors
26  *    may be used to endorse or promote products derived from this software
27  *    without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39  * SUCH DAMAGE.
40  *
41  *
42  * File: am-utils/conf/nfs_prot/nfs_prot_nextstep.h
43  *
44  */
45 
46 #ifndef _AMU_NFS_PROT_H
47 #define _AMU_NFS_PROT_H
48 
49 #ifdef HAVE_RPCSVC_NFS_PROT_H
50 # include <rpcsvc/nfs_prot.h>
51 #endif /* HAVE_RPCSVC_NFS_PROT_H */
52 #ifdef HAVE_BSD_RPC_RPC_H
53 # include <bsd/rpc/rpc.h>
54 #endif /* HAVE_BSD_RPC_RPC_H */
55 #ifdef HAVE_SYS_STAT_H
56 # include <sys/stat.h>
57 #endif /* HAVE_SYS_STAT_H */
58 
59 /*
60  * odd problems happen during configuration and nextstep's /bin/cc
61  * gets strange errors from /bin/sh.  I suspect it may be a conflict
62  * over some memory, a bad /bin/cc, or even kernel bug.
63  * this is what I get, as a result of running cc inside configure:
64  *  /bin/cc -o conftest -g -O2 -D_POSIX_SOURCE conftest.c -lrpcsvc
65  *  configure:2294: illegal external declaration, found `#'
66  *  configure:2388: illegal file name 'AMU_NFS_PROTOCOL_HEADER'
67  *  configure:2416: illegal external declaration, found `{'
68  * I have no explanation for it... -Erez
69  * Solution: don't use /bin/cc, but gcc 2.7.2.1 or better!
70  */
71 
72 #if 0
73 /* cannot include this file b/c it refers to non-existing headers */
74 # include <bsd/nfs/nfs_mount.h>
75 #endif /* 0 */
76 
77 
78 /*
79  * MACROS:
80  */
81 
82 /* ugly: fix up nextstep's nfs mount type */
83 #ifdef MOUNT_TYPE_NFS___off_no_longer_needed
84 # undef MOUNT_TYPE_UFS
85 # define MOUNT_TYPE_UFS		MOUNT_UFS
86 # undef MOUNT_TYPE_NFS
87 # define MOUNT_TYPE_NFS		MOUNT_NFS
88 # undef MOUNT_TYPE_PCFS
89 # define MOUNT_TYPE_PCFS	MOUNT_PC
90 # undef MOUNT_TYPE_LOFS
91 # define MOUNT_TYPE_LOFS	MOUNT_LO
92 # undef MOUNT_TYPE_SPECFS
93 # define MOUNT_TYPE_SPECFS	MOUNT_SPECFS
94 # undef MOUNT_TYPE_CFS
95 # define MOUNT_TYPE_CFS		MOUNT_CFS
96 #endif /* MOUNT_TYPE_NFS */
97 
98 #define	dr_drok_u	diropres
99 #define ca_attributes	attributes
100 #define ca_where	where
101 #define da_fhandle	dir
102 #define da_name		name
103 #define dl_entries	entries
104 #define dl_eof		eof
105 #define dr_status	status
106 #define dr_u		diropres_u
107 #define drok_attributes	attributes
108 #define drok_fhandle	file
109 #define fh_data		data
110 #define la_fhandle	from
111 #define la_to		to
112 #define na_atime	atime
113 #define na_blocks	blocks
114 #define na_blocksize	blocksize
115 #define na_ctime	ctime
116 #define na_fileid	fileid
117 #define na_fsid		fsid
118 #define na_gid		gid
119 #define na_mode		mode
120 #define na_mtime	mtime
121 #define na_nlink	nlink
122 #define na_rdev		rdev
123 #define na_size		size
124 #define na_type		type
125 #define na_uid		uid
126 #define ne_cookie	cookie
127 #define ne_fileid	fileid
128 #define ne_name		name
129 #define ne_nextentry	nextentry
130 #define ns_attr_u	attributes
131 #define ns_status	status
132 #define ns_u		attrstat_u
133 #define nt_seconds	seconds
134 #define nt_useconds	useconds
135 #define ra_count	count
136 #define ra_fhandle	file
137 #define ra_offset	offset
138 #define ra_totalcount	totalcount
139 #define raok_attributes	attributes
140 #define raok_len_u	data_len
141 #define raok_u		data
142 #define raok_val_u	data_val
143 #define rda_cookie	cookie
144 #define rda_count	count
145 #define rda_fhandle	dir
146 #define rdr_reply_u	reply
147 #define rdr_status	status
148 #define rdr_u		readdirres_u
149 #define rlr_data_u	data
150 #define rlr_status	status
151 #define rlr_u		readlinkres_u
152 #define rna_from	from
153 #define rna_to		to
154 #define rr_reply_u	reply
155 #define rr_status	status
156 #define rr_u		readres_u
157 #define sa_atime	atime
158 #define sa_gid		gid
159 #define sa_mode		mode
160 #define sa_mtime	mtime
161 #define sa_size		size
162 #define sa_uid		uid
163 #define sag_attributes	attributes
164 #define sag_fhandle	file
165 #define sfr_reply_u	reply
166 #define sfr_status	status
167 #define sfr_u		statfsres_u
168 #define sfrok_bavail	bavail
169 #define sfrok_bfree	bfree
170 #define sfrok_blocks	blocks
171 #define sfrok_bsize	bsize
172 #define sfrok_tsize	tsize
173 #define sla_attributes	attributes
174 #define sla_from	from
175 #define sla_to		to
176 #define wra_beginoffset	beginoffset
177 #define wra_fhandle	file
178 #define wra_len_u	data_len
179 #define wra_offset	offset
180 #define wra_totalcount	totalcount
181 #define wra_u		data
182 #define wra_val_u	data_val
183 
184 /* map field names */
185 #define ex_dir ex_name
186 #define gr_name g_name
187 #define gr_next g_next
188 #define ml_directory ml_path
189 #define ml_hostname ml_name
190 #define ml_next ml_nxt
191 
192 /*
193  * NFS mount option flags
194  */
195 #define	NFSMNT_SOFT	0x001	/* soft mount (hard is default) */
196 #define	NFSMNT_WSIZE	0x002	/* set write size */
197 #define	NFSMNT_RSIZE	0x004	/* set read size */
198 #define	NFSMNT_TIMEO	0x008	/* set initial timeout */
199 #define	NFSMNT_RETRANS	0x010	/* set number of request retries */
200 #define	NFSMNT_HOSTNAME	0x020	/* set hostname for error printf */
201 #define	NFSMNT_INT	0x040	/* allow interrupts on hard mount */
202 #define	NFSMNT_NOAC	0x080	/* don't cache attributes */
203 #define	NFSMNT_ACREGMIN	0x0100	/* set min secs for file attr cache */
204 #define	NFSMNT_ACREGMAX	0x0200	/* set max secs for file attr cache */
205 #define	NFSMNT_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
206 #define	NFSMNT_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
207 #define NFSMNT_SECURE	0x1000	/* secure mount */
208 #define NFSMNT_NOCTO	0x2000	/* no close-to-open consistency */
209 
210 #define NFS_PORT	2049
211 #ifndef NFS_MAXDATA
212 # define NFS_MAXDATA	8192
213 #endif /* NFS_MAXDATA */
214 #define NFS_MAXPATHLEN	1024
215 #define NFS_MAXNAMLEN	255
216 #define NFS_FHSIZE	32
217 #define NFS_COOKIESIZE	4
218 #define	MNTPATHLEN	1024
219 #define	MNTNAMLEN	255
220 
221 #define NFSMODE_FMT	0170000
222 #define NFSMODE_DIR	0040000
223 #define NFSMODE_CHR	0020000
224 #define NFSMODE_BLK	0060000
225 #define NFSMODE_REG	0100000
226 #define NFSMODE_LNK	0120000
227 #define NFSMODE_SOCK	0140000
228 #define NFSMODE_FIFO	0010000
229 
230 #ifndef NFS_PROGRAM
231 # define NFS_PROGRAM	((u_long)100003)
232 #endif /* not NFS_PROGRAM */
233 #ifndef NFS_VERSION
234 # define NFS_VERSION	((u_long)2)
235 #endif /* not NFS_VERSION */
236 
237 #define NFSPROC_NULL		((u_long)0)
238 #define NFSPROC_GETATTR		((u_long)1)
239 #define NFSPROC_SETATTR		((u_long)2)
240 #define NFSPROC_ROOT		((u_long)3)
241 #define NFSPROC_LOOKUP		((u_long)4)
242 #define NFSPROC_READLINK	((u_long)5)
243 #define NFSPROC_READ		((u_long)6)
244 #define NFSPROC_WRITECACHE	((u_long)7)
245 #define NFSPROC_WRITE		((u_long)8)
246 #define NFSPROC_CREATE		((u_long)9)
247 #define NFSPROC_REMOVE		((u_long)10)
248 #define NFSPROC_RENAME		((u_long)11)
249 #define NFSPROC_LINK		((u_long)12)
250 #define NFSPROC_SYMLINK		((u_long)13)
251 #define NFSPROC_MKDIR		((u_long)14)
252 #define NFSPROC_RMDIR		((u_long)15)
253 #define NFSPROC_READDIR		((u_long)16)
254 #define NFSPROC_STATFS		((u_long)17)
255 
256 /*
257  * fix up or complete other some definitions...
258  */
259 #define WNOHANG         01
260 #define WUNTRACED       02
261 #define WIFSTOPPED(status)      ((status) & 0100)
262 #define WSTOPSIG(status)        (int)(WIFSTOPPED(status) ? \
263 				      (((status) >> 8) & 0177) : -1)
264 #define WIFSIGNALED(status)     ( !WIFEXITED(status) && \
265 				  !WIFSTOPPED(status) )
266 #define WTERMSIG(status)        (int)(WIFSIGNALED(status) ? \
267                                       ((status) & 0177) : -1)
268 /* define missing macros */
269 #ifndef S_ISDIR
270 # ifdef S_IFMT
271 #  define S_ISDIR(mode)   (((mode) & (S_IFMT)) == (S_IFDIR))
272 # else /* not S_IFMT */
273 #  define S_ISDIR(mode)   (((mode) & (_S_IFMT)) == (_S_IFDIR))
274 # endif /* not S_IFMT */
275 #endif /* not S_ISDIR */
276 
277 /*
278  * ENUMS:
279  */
280 
281 enum nfstype {
282   NFNON = 0,
283   NFREG = 1,
284   NFDIR = 2,
285   NFBLK = 3,
286   NFCHR = 4,
287   NFLNK = 5,
288   NFSOCK = 6,
289   NFBAD = 7,
290   NFFIFO = 8,
291 };
292 
293 enum nfsstat {
294   NFS_OK = 0,                     /* no error */
295   NFSERR_PERM=EPERM,              /* Not owner */
296   NFSERR_NOENT=ENOENT,            /* No such file or directory */
297   NFSERR_IO=EIO,                  /* I/O error */
298   NFSERR_NXIO=ENXIO,              /* No such device or address */
299   NFSERR_ACCES=EACCES,            /* Permission denied */
300   NFSERR_EXIST=EEXIST,            /* File exists */
301   NFSERR_NODEV=ENODEV,            /* No such device */
302   NFSERR_NOTDIR=ENOTDIR,          /* Not a directory */
303   NFSERR_ISDIR=EISDIR,            /* Is a directory */
304   NFSERR_FBIG=EFBIG,              /* File too large */
305   NFSERR_NOSPC=ENOSPC,            /* No space left on device */
306   NFSERR_ROFS=EROFS,              /* Read-only file system */
307   NFSERR_NAMETOOLONG=ENAMETOOLONG,/* File name too long */
308   NFSERR_NOTEMPTY=ENOTEMPTY,      /* Directory not empty */
309   NFSERR_DQUOT=EDQUOT,            /* Disc quota exceeded */
310   NFSERR_STALE=ESTALE,            /* Stale NFS file handle */
311   NFSERR_WFLUSH                   /* write cache flushed */
312 };
313 
314 
315 /*
316  * TYPEDEFS:
317  */
318 typedef char *dirpath;
319 typedef char *filename;
320 typedef char *name;
321 typedef char *nfspath;
322 typedef char fhandle[NFS_FHSIZE];
323 typedef char nfscookie[NFS_COOKIESIZE];
324 typedef enum ftype ftype;
325 typedef enum nfsstat nfsstat;
326 typedef enum nfstype nfsftype;
327 typedef fhandle fhandle_t;
328 typedef struct attrstat nfsattrstat;
329 typedef struct createargs nfscreateargs;
330 typedef struct dirlist nfsdirlist;
331 typedef struct diropargs nfsdiropargs;
332 typedef struct diropokres nfsdiropokres;
333 typedef struct diropres nfsdiropres;
334 typedef struct entry nfsentry;
335 typedef struct exports *exports;
336 typedef struct exports exportnode;
337 typedef struct fattr nfsfattr;
338 typedef struct fhstatus fhstatus;
339 typedef struct groups *groups;
340 typedef struct groups groupnode;
341 typedef struct linkargs nfslinkargs;
342 typedef struct mountlist *mountlist;
343 typedef struct mountlist mountbody;
344 typedef struct nfs_fh nfs_fh;
345 typedef struct nfstime nfstime;
346 typedef struct readargs nfsreadargs;
347 typedef struct readdirargs nfsreaddirargs;
348 typedef struct readdirres nfsreaddirres;
349 typedef struct readlinkres nfsreadlinkres;
350 typedef struct readokres nfsreadokres;
351 typedef struct readres nfsreadres;
352 typedef struct renameargs nfsrenameargs;
353 typedef struct sattr nfssattr;
354 typedef struct sattrargs nfssattrargs;
355 typedef struct statfsokres nfsstatfsokres;
356 typedef struct statfsres nfsstatfsres;
357 typedef struct symlinkargs nfssymlinkargs;
358 typedef struct writeargs nfswriteargs;
359 
360 
361 /*
362  * EXTERNALS:
363  */
364 
365 extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
366 extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
367 extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
368 extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
369 extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
370 extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
371 extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
372 extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
373 extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
374 extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
375 extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
376 extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
377 extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
378 extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
379 extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
380 extern void *nfsproc_null_2_svc(void *, struct svc_req *);
381 extern void *nfsproc_root_2_svc(void *, struct svc_req *);
382 extern void *nfsproc_writecache_2_svc(void *, struct svc_req *);
383 
384 extern bool_t xdr_attrstat(XDR *, nfsattrstat*);
385 extern bool_t xdr_createargs(XDR *, nfscreateargs*);
386 extern bool_t xdr_dirlist(XDR *, nfsdirlist*);
387 extern bool_t xdr_diropargs(XDR *, nfsdiropargs*);
388 extern bool_t xdr_diropokres(XDR *, nfsdiropokres*);
389 extern bool_t xdr_diropres(XDR *, nfsdiropres*);
390 extern bool_t xdr_entry(XDR *, nfsentry*);
391 extern bool_t xdr_fattr(XDR *, nfsfattr*);
392 extern bool_t xdr_filename(XDR *, filename*);
393 extern bool_t xdr_ftype(XDR *, nfsftype*);
394 extern bool_t xdr_linkargs(XDR *, nfslinkargs*);
395 extern bool_t xdr_mountlist(XDR *xdrs, mountlist *objp);
396 extern bool_t xdr_nfs_fh(XDR *, nfs_fh*);
397 extern bool_t xdr_nfscookie(XDR *, nfscookie);
398 extern bool_t xdr_nfspath(XDR *, nfspath*);
399 extern bool_t xdr_nfsstat(XDR *, nfsstat*);
400 extern bool_t xdr_nfstime(XDR *, nfstime*);
401 extern bool_t xdr_readargs(XDR *, nfsreadargs*);
402 extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*);
403 extern bool_t xdr_readdirres(XDR *, nfsreaddirres*);
404 extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*);
405 extern bool_t xdr_readokres(XDR *, nfsreadokres*);
406 extern bool_t xdr_readres(XDR *, nfsreadres*);
407 extern bool_t xdr_renameargs(XDR *, nfsrenameargs*);
408 extern bool_t xdr_sattr(XDR *, nfssattr*);
409 extern bool_t xdr_sattrargs(XDR *, nfssattrargs*);
410 extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*);
411 extern bool_t xdr_statfsres(XDR *, nfsstatfsres*);
412 extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*);
413 extern bool_t xdr_writeargs(XDR *, nfswriteargs*);
414 
415 
416 /*
417  * STRUCTURES:
418  */
419 
420 struct nfs_args {
421   struct sockaddr_in	*addr;		/* file server address */
422   caddr_t		fh;		/* File handle to be mounted */
423   int			flags;		/* flags */
424   int			wsize;		/* write size in bytes */
425   int			rsize;		/* read size in bytes */
426   int			timeo;		/* initial timeout in .1 secs */
427   int			retrans;	/* times to retry send */
428   char			*hostname;	/* server's hostname */
429   int			acregmin;	/* attr cache file min secs */
430   int			acregmax;	/* attr cache file max secs */
431   int			acdirmin;	/* attr cache dir min secs */
432   int			acdirmax;	/* attr cache dir max secs */
433   char			*netname;	/* server's netname */
434 };
435 
436 struct nfs_fh {
437   char data[NFS_FHSIZE];
438 };
439 
440 struct nfstime {
441   u_int nt_seconds;
442   u_int nt_useconds;
443 };
444 
445 struct fattr {
446   nfsftype na_type;
447   u_int na_mode;
448   u_int na_nlink;
449   u_int na_uid;
450   u_int na_gid;
451   u_int na_size;
452   u_int na_blocksize;
453   u_int na_rdev;
454   u_int na_blocks;
455   u_int na_fsid;
456   u_int na_fileid;
457   nfstime na_atime;
458   nfstime na_mtime;
459   nfstime na_ctime;
460 };
461 
462 struct sattr {
463   u_int sa_mode;
464   u_int sa_uid;
465   u_int sa_gid;
466   u_int sa_size;
467   nfstime sa_atime;
468   nfstime sa_mtime;
469 };
470 
471 struct attrstat {
472   nfsstat ns_status;
473   union {
474     nfsfattr ns_attr_u;
475   } ns_u;
476 };
477 
478 struct sattrargs {
479   nfs_fh sag_fhandle;
480   nfssattr sag_attributes;
481 };
482 
483 struct diropargs {
484   nfs_fh da_fhandle;		/* was dir */
485   filename da_name;
486 };
487 
488 struct diropokres {
489   nfs_fh drok_fhandle;
490   nfsfattr drok_attributes;
491 };
492 
493 struct diropres {
494   nfsstat dr_status;		/* was status */
495   union {
496     nfsdiropokres dr_drok_u;	/* was diropres */
497   } dr_u;			/* was diropres_u */
498 };
499 
500 struct readlinkres {
501   nfsstat rlr_status;
502   union {
503     nfspath rlr_data_u;
504   } rlr_u;
505 };
506 
507 struct readargs {
508   nfs_fh ra_fhandle;
509   u_int ra_offset;
510   u_int ra_count;
511   u_int ra_totalcount;
512 };
513 
514 struct readokres {
515   nfsfattr raok_attributes;
516   struct {
517     u_int raok_len_u;
518     char *raok_val_u;
519   } raok_u;
520 };
521 
522 struct readres {
523   nfsstat rr_status;
524   union {
525     nfsreadokres rr_reply_u;
526   } rr_u;
527 };
528 
529 struct writeargs {
530   nfs_fh wra_fhandle;
531   u_int wra_beginoffset;
532   u_int wra_offset;
533   u_int wra_totalcount;
534   struct {
535     u_int wra_len_u;
536     char *wra_val_u;
537   } wra_u;
538 };
539 
540 struct createargs {
541   nfsdiropargs ca_where;
542   nfssattr ca_attributes;
543 };
544 
545 struct renameargs {
546   nfsdiropargs rna_from;
547   nfsdiropargs rna_to;
548 };
549 
550 struct linkargs {
551   nfs_fh la_fhandle;
552   nfsdiropargs la_to;
553 };
554 
555 struct symlinkargs {
556   nfsdiropargs sla_from;
557   nfspath sla_to;
558   nfssattr sla_attributes;
559 };
560 
561 struct readdirargs {
562   nfs_fh rda_fhandle;
563   nfscookie rda_cookie;
564   u_int rda_count;
565 };
566 
567 struct entry {
568   u_int ne_fileid;
569   filename ne_name;
570   nfscookie ne_cookie;
571   nfsentry *ne_nextentry;
572 };
573 
574 struct dirlist {
575   nfsentry *dl_entries;
576   bool_t dl_eof;
577 };
578 
579 struct readdirres {
580   nfsstat rdr_status;
581   union {
582     nfsdirlist rdr_reply_u;
583   } rdr_u;
584 };
585 
586 struct statfsokres {
587   u_int sfrok_tsize;
588   u_int sfrok_bsize;
589   u_int sfrok_blocks;
590   u_int sfrok_bfree;
591   u_int sfrok_bavail;
592 };
593 
594 struct statfsres {
595   nfsstat sfr_status;
596   union {
597     nfsstatfsokres sfr_reply_u;
598   } sfr_u;
599 };
600 
601 #endif /* not _AMU_NFS_PROT_H */
602