xref: /plan9/sys/include/nfs3.h (revision 34e0422554c8e8bef66509534d2c44f4660bf678)
1 /*
2  * NFS mounter V3;  see RFC 1813
3  */
4 
5 #pragma lib "libsunrpc.a"
6 #pragma src "/sys/src/libsunrpc"
7 
8 enum {
9 	NfsMount1HandleSize = 32,
10 	NfsMount3MaxPathSize = 1024,
11 	NfsMount3MaxNameSize = 255,
12 	NfsMount3MaxHandleSize = 64,
13 	NfsMount3Program = 100005,
14 	NfsMount3Version = 3,
15 	NfsMount1Program = 100005,
16 	NfsMount1Version = 1
17 };
18 typedef struct NfsMount3TNull NfsMount3TNull;
19 typedef struct NfsMount3RNull NfsMount3RNull;
20 typedef struct NfsMount3TMnt NfsMount3TMnt;
21 typedef struct NfsMount3RMnt NfsMount3RMnt;
22 typedef struct NfsMount3TDump NfsMount3TDump;
23 typedef struct NfsMount3Entry NfsMount3Entry;
24 typedef struct NfsMount3RDump NfsMount3RDump;
25 typedef struct NfsMount3TUmnt NfsMount3TUmnt;
26 typedef struct NfsMount3RUmnt NfsMount3RUmnt;
27 typedef struct NfsMount3Export NfsMount3Export;
28 typedef struct NfsMount3TUmntall NfsMount3TUmntall;
29 typedef struct NfsMount3RUmntall NfsMount3RUmntall;
30 typedef struct NfsMount3TExport NfsMount3TExport;
31 typedef struct NfsMount3RExport NfsMount3RExport;
32 
33 typedef enum
34 {
35 	NfsMount3CallTNull,
36 	NfsMount3CallRNull,
37 	NfsMount3CallTMnt,
38 	NfsMount3CallRMnt,
39 	NfsMount3CallTDump,
40 	NfsMount3CallRDump,
41 	NfsMount3CallTUmnt,
42 	NfsMount3CallRUmnt,
43 	NfsMount3CallTUmntall,
44 	NfsMount3CallRUmntall,
45 	NfsMount3CallTExport,
46 	NfsMount3CallRExport
47 } NfsMount3CallType;
48 
49 typedef struct NfsMount3Call NfsMount3Call;
50 struct NfsMount3Call {
51 	SunRpc rpc;
52 	NfsMount3CallType type;
53 };
54 
55 struct NfsMount3TNull {
56 	NfsMount3Call call;
57 };
58 
59 struct NfsMount3RNull {
60 	NfsMount3Call call;
61 };
62 
63 struct NfsMount3TMnt {
64 	NfsMount3Call call;
65 	char *path;
66 };
67 
68 struct NfsMount3RMnt {
69 	NfsMount3Call call;
70 	uint status;
71 	uchar *handle;
72 	uint len;
73 	u32int *auth;
74 	u32int nauth;
75 };
76 
77 struct NfsMount3TDump {
78 	NfsMount3Call call;
79 };
80 
81 struct NfsMount3Entry {
82 	char *host;
83 	char *path;
84 };
85 
86 struct NfsMount3RDump {
87 	NfsMount3Call call;
88 	uchar *data;
89 	u32int count;
90 };
91 
92 struct NfsMount3TUmnt {
93 	NfsMount3Call call;
94 	char *path;
95 };
96 
97 struct NfsMount3RUmnt {
98 	NfsMount3Call call;
99 };
100 
101 struct NfsMount3Export {
102 	char *path;
103 	char **g;
104 	u32int ng;
105 };
106 
107 struct NfsMount3TUmntall {
108 	NfsMount3Call call;
109 };
110 
111 struct NfsMount3RUmntall {
112 	NfsMount3Call call;
113 };
114 
115 struct NfsMount3TExport {
116 	NfsMount3Call call;
117 };
118 
119 struct NfsMount3RExport {
120 	NfsMount3Call call;
121 	uchar *data;
122 	u32int count;
123 };
124 
125 uint nfsMount3ExportGroupSize(uchar*);
126 uint nfsMount3ExportSize(NfsMount3Export*);
127 int nfsMount3ExportPack(uchar*, uchar*, uchar**, NfsMount3Export*);
128 int nfsMount3ExportUnpack(uchar*, uchar*, uchar**, char**, char***, NfsMount3Export*);
129 int nfsMount3EntryPack(uchar*, uchar*, uchar**, NfsMount3Entry*);
130 int nfsMount3EntryUnpack(uchar*, uchar*, uchar**, NfsMount3Entry*);
131 uint nfsMount3EntrySize(NfsMount3Entry*);
132 
133 extern SunProg nfsMount3Prog;
134 
135 /*
136  * NFS V3; see RFC 1813
137  */
138 enum {
139 	Nfs3MaxHandleSize = 64,
140 	Nfs3CookieVerfSize = 8,
141 	Nfs3CreateVerfSize = 8,
142 	Nfs3WriteVerfSize = 8,
143 	Nfs3AccessRead = 1,
144 	Nfs3AccessLookup = 2,
145 	Nfs3AccessModify = 4,
146 	Nfs3AccessExtend = 8,
147 	Nfs3AccessDelete = 16,
148 	Nfs3AccessExecute = 32,
149 	Nfs3FsHasLinks = 1,
150 	Nfs3FsHasSymlinks = 2,
151 	Nfs3FsHomogeneous = 8,
152 	Nfs3FsCanSetTime = 16,
153 
154 	Nfs3Version = 3,
155 	Nfs3Program = 100003,
156 };
157 typedef enum
158 {
159 	Nfs3Ok = 0,
160 	Nfs3ErrNotOwner = 1,
161 	Nfs3ErrNoEnt = 2,
162 	Nfs3ErrIo = 5,
163 	Nfs3ErrNxio = 6,
164 	Nfs3ErrNoMem = 12,
165 	Nfs3ErrAcces = 13,
166 	Nfs3ErrExist = 17,
167 	Nfs3ErrXDev = 18,
168 	Nfs3ErrNoDev = 19,
169 	Nfs3ErrNotDir = 20,
170 	Nfs3ErrIsDir = 21,
171 	Nfs3ErrInval = 22,
172 	Nfs3ErrFbig = 27,
173 	Nfs3ErrNoSpc = 28,
174 	Nfs3ErrRoFs = 30,
175 	Nfs3ErrMLink = 31,
176 	Nfs3ErrNameTooLong = 63,
177 	Nfs3ErrNotEmpty = 66,
178 	Nfs3ErrDQuot = 69,
179 	Nfs3ErrStale = 70,
180 	Nfs3ErrRemote = 71,
181 	Nfs3ErrBadHandle = 10001,
182 	Nfs3ErrNotSync = 10002,
183 	Nfs3ErrBadCookie = 10003,
184 	Nfs3ErrNotSupp = 10004,
185 	Nfs3ErrTooSmall = 10005,
186 	Nfs3ErrServerFault = 10006,
187 	Nfs3ErrBadType = 10007,
188 	Nfs3ErrJukebox = 10008,
189 	Nfs3ErrFprintNotFound = 10009,
190 	Nfs3ErrAborted = 10010,
191 } Nfs3Status;
192 
193 void nfs3Errstr(Nfs3Status);
194 
195 typedef enum
196 {
197 	Nfs3FileReg = 1,
198 	Nfs3FileDir = 2,
199 	Nfs3FileBlock = 3,
200 	Nfs3FileChar = 4,
201 	Nfs3FileSymlink = 5,
202 	Nfs3FileSocket = 6,
203 	Nfs3FileFifo = 7,
204 } Nfs3FileType;
205 
206 enum
207 {
208 	Nfs3ModeSetUid = 0x800,
209 	Nfs3ModeSetGid = 0x400,
210 	Nfs3ModeSticky = 0x200,
211 };
212 
213 typedef enum
214 {
215 	Nfs3CallTNull,
216 	Nfs3CallRNull,
217 	Nfs3CallTGetattr,
218 	Nfs3CallRGetattr,
219 	Nfs3CallTSetattr,
220 	Nfs3CallRSetattr,
221 	Nfs3CallTLookup,
222 	Nfs3CallRLookup,
223 	Nfs3CallTAccess,
224 	Nfs3CallRAccess,
225 	Nfs3CallTReadlink,
226 	Nfs3CallRReadlink,
227 	Nfs3CallTRead,
228 	Nfs3CallRRead,
229 	Nfs3CallTWrite,
230 	Nfs3CallRWrite,
231 	Nfs3CallTCreate,
232 	Nfs3CallRCreate,
233 	Nfs3CallTMkdir,
234 	Nfs3CallRMkdir,
235 	Nfs3CallTSymlink,
236 	Nfs3CallRSymlink,
237 	Nfs3CallTMknod,
238 	Nfs3CallRMknod,
239 	Nfs3CallTRemove,
240 	Nfs3CallRRemove,
241 	Nfs3CallTRmdir,
242 	Nfs3CallRRmdir,
243 	Nfs3CallTRename,
244 	Nfs3CallRRename,
245 	Nfs3CallTLink,
246 	Nfs3CallRLink,
247 	Nfs3CallTReadDir,
248 	Nfs3CallRReadDir,
249 	Nfs3CallTReadDirPlus,
250 	Nfs3CallRReadDirPlus,
251 	Nfs3CallTFsStat,
252 	Nfs3CallRFsStat,
253 	Nfs3CallTFsInfo,
254 	Nfs3CallRFsInfo,
255 	Nfs3CallTPathconf,
256 	Nfs3CallRPathconf,
257 	Nfs3CallTCommit,
258 	Nfs3CallRCommit,
259 } Nfs3CallType;
260 
261 typedef struct Nfs3Call Nfs3Call;
262 typedef struct Nfs3Handle Nfs3Handle;
263 typedef struct Nfs3Time Nfs3Time;
264 typedef struct Nfs3Attr Nfs3Attr;
265 typedef struct Nfs3WccAttr Nfs3WccAttr;
266 typedef struct Nfs3Wcc Nfs3Wcc;
267 typedef enum
268 {
269 	Nfs3SetTimeDont = 0,
270 	Nfs3SetTimeServer = 1,
271 	Nfs3SetTimeClient = 2,
272 } Nfs3SetTime;
273 
274 typedef struct Nfs3SetAttr Nfs3SetAttr;
275 typedef struct Nfs3TNull Nfs3TNull;
276 typedef struct Nfs3RNull Nfs3RNull;
277 typedef struct Nfs3TGetattr Nfs3TGetattr;
278 typedef struct Nfs3RGetattr Nfs3RGetattr;
279 typedef struct Nfs3TSetattr Nfs3TSetattr;
280 typedef struct Nfs3RSetattr Nfs3RSetattr;
281 typedef struct Nfs3TLookup Nfs3TLookup;
282 typedef struct Nfs3RLookup Nfs3RLookup;
283 typedef struct Nfs3TAccess Nfs3TAccess;
284 typedef struct Nfs3RAccess Nfs3RAccess;
285 typedef struct Nfs3TReadlink Nfs3TReadlink;
286 typedef struct Nfs3RReadlink Nfs3RReadlink;
287 typedef struct Nfs3TRead Nfs3TRead;
288 typedef struct Nfs3RRead Nfs3RRead;
289 typedef enum
290 {
291 	Nfs3SyncNone = 0,
292 	Nfs3SyncData = 1,
293 	Nfs3SyncFile = 2,
294 } Nfs3Sync;
295 
296 typedef struct Nfs3TWrite Nfs3TWrite;
297 typedef struct Nfs3RWrite Nfs3RWrite;
298 typedef enum
299 {
300 	Nfs3CreateUnchecked = 0,
301 	Nfs3CreateGuarded = 1,
302 	Nfs3CreateExclusive = 2,
303 } Nfs3Create;
304 
305 typedef struct Nfs3TCreate Nfs3TCreate;
306 typedef struct Nfs3RCreate Nfs3RCreate;
307 typedef struct Nfs3TMkdir Nfs3TMkdir;
308 typedef struct Nfs3RMkdir Nfs3RMkdir;
309 typedef struct Nfs3TSymlink Nfs3TSymlink;
310 typedef struct Nfs3RSymlink Nfs3RSymlink;
311 typedef struct Nfs3TMknod Nfs3TMknod;
312 typedef struct Nfs3RMknod Nfs3RMknod;
313 typedef struct Nfs3TRemove Nfs3TRemove;
314 typedef struct Nfs3RRemove Nfs3RRemove;
315 typedef struct Nfs3TRmdir Nfs3TRmdir;
316 typedef struct Nfs3RRmdir Nfs3RRmdir;
317 typedef struct Nfs3TRename Nfs3TRename;
318 typedef struct Nfs3RRename Nfs3RRename;
319 typedef struct Nfs3TLink Nfs3TLink;
320 typedef struct Nfs3RLink Nfs3RLink;
321 typedef struct Nfs3TReadDir Nfs3TReadDir;
322 typedef struct Nfs3Entry Nfs3Entry;
323 typedef struct Nfs3RReadDir Nfs3RReadDir;
324 typedef struct Nfs3TReadDirPlus Nfs3TReadDirPlus;
325 typedef struct Nfs3EntryPlus Nfs3EntryPlus;
326 typedef struct Nfs3RReadDirPlus Nfs3RReadDirPlus;
327 typedef struct Nfs3TFsStat Nfs3TFsStat;
328 typedef struct Nfs3RFsStat Nfs3RFsStat;
329 typedef struct Nfs3TFsInfo Nfs3TFsInfo;
330 typedef struct Nfs3RFsInfo Nfs3RFsInfo;
331 typedef struct Nfs3TPathconf Nfs3TPathconf;
332 typedef struct Nfs3RPathconf Nfs3RPathconf;
333 typedef struct Nfs3TCommit Nfs3TCommit;
334 typedef struct Nfs3RCommit Nfs3RCommit;
335 
336 struct Nfs3Call {
337 	SunRpc rpc;
338 	Nfs3CallType type;
339 };
340 
341 struct Nfs3Handle {
342 	uchar h[Nfs3MaxHandleSize];
343 	u32int len;
344 };
345 
346 struct Nfs3Time {
347 	u32int sec;
348 	u32int nsec;
349 };
350 
351 struct Nfs3Attr {
352 	Nfs3FileType type;
353 	u32int mode;
354 	u32int nlink;
355 	u32int uid;
356 	u32int gid;
357 	u64int size;
358 	u64int used;
359 	u32int major;
360 	u32int minor;
361 	u64int fsid;
362 	u64int fileid;
363 	Nfs3Time atime;
364 	Nfs3Time mtime;
365 	Nfs3Time ctime;
366 };
367 
368 struct Nfs3WccAttr {
369 	u64int size;
370 	Nfs3Time mtime;
371 	Nfs3Time ctime;
372 };
373 
374 struct Nfs3Wcc {
375 	u1int haveWccAttr;
376 	Nfs3WccAttr wccAttr;
377 	u1int haveAttr;
378 	Nfs3Attr attr;
379 };
380 
381 struct Nfs3SetAttr {
382 	u1int setMode;
383 	u32int mode;
384 	u1int setUid;
385 	u32int uid;
386 	u1int setGid;
387 	u32int gid;
388 	u1int setSize;
389 	u64int size;
390 	Nfs3SetTime setAtime;
391 	Nfs3Time atime;
392 	Nfs3SetTime setMtime;
393 	Nfs3Time mtime;
394 };
395 
396 struct Nfs3TNull {
397 	Nfs3Call call;
398 };
399 
400 struct Nfs3RNull {
401 	Nfs3Call call;
402 };
403 
404 struct Nfs3TGetattr {
405 	Nfs3Call call;
406 	Nfs3Handle handle;
407 };
408 
409 struct Nfs3RGetattr {
410 	Nfs3Call call;
411 	Nfs3Status status;
412 	Nfs3Attr attr;
413 };
414 
415 struct Nfs3TSetattr {
416 	Nfs3Call call;
417 	Nfs3Handle handle;
418 	Nfs3SetAttr attr;
419 	u1int checkCtime;
420 	Nfs3Time ctime;
421 };
422 
423 struct Nfs3RSetattr {
424 	Nfs3Call call;
425 	Nfs3Status status;
426 	Nfs3Wcc wcc;
427 };
428 
429 struct Nfs3TLookup {
430 	Nfs3Call call;
431 	Nfs3Handle handle;
432 	char *name;
433 };
434 
435 struct Nfs3RLookup {
436 	Nfs3Call call;
437 	Nfs3Status status;
438 	Nfs3Handle handle;
439 	u1int haveAttr;
440 	Nfs3Attr attr;
441 	u1int haveDirAttr;
442 	Nfs3Attr dirAttr;
443 };
444 
445 struct Nfs3TAccess {
446 	Nfs3Call call;
447 	Nfs3Handle handle;
448 	u32int access;
449 };
450 
451 struct Nfs3RAccess {
452 	Nfs3Call call;
453 	Nfs3Status status;
454 	u1int haveAttr;
455 	Nfs3Attr attr;
456 	u32int access;
457 };
458 
459 struct Nfs3TReadlink {
460 	Nfs3Call call;
461 	Nfs3Handle handle;
462 };
463 
464 struct Nfs3RReadlink {
465 	Nfs3Call call;
466 	Nfs3Status status;
467 	u1int haveAttr;
468 	Nfs3Attr attr;
469 	char *data;
470 };
471 
472 struct Nfs3TRead {
473 	Nfs3Call call;
474 	Nfs3Handle handle;
475 	u64int offset;
476 	u32int count;
477 };
478 
479 struct Nfs3RRead {
480 	Nfs3Call call;
481 	Nfs3Status status;
482 	u1int haveAttr;
483 	Nfs3Attr attr;
484 	u32int count;
485 	u1int eof;
486 	uchar *data;
487 	u32int ndata;
488 };
489 
490 struct Nfs3TWrite {
491 	Nfs3Call call;
492 	Nfs3Handle handle;
493 	u64int offset;
494 	u32int count;
495 	Nfs3Sync stable;
496 	uchar *data;
497 	u32int ndata;
498 };
499 
500 struct Nfs3RWrite {
501 	Nfs3Call call;
502 	Nfs3Status status;
503 	Nfs3Wcc wcc;
504 	u32int count;
505 	Nfs3Sync committed;
506 	uchar verf[Nfs3WriteVerfSize];
507 };
508 
509 struct Nfs3TCreate {
510 	Nfs3Call call;
511 	Nfs3Handle handle;
512 	char *name;
513 	Nfs3Create mode;
514 	Nfs3SetAttr attr;
515 	uchar verf[Nfs3CreateVerfSize];
516 };
517 
518 struct Nfs3RCreate {
519 	Nfs3Call call;
520 	Nfs3Status status;
521 	u1int haveHandle;
522 	Nfs3Handle handle;
523 	u1int haveAttr;
524 	Nfs3Attr attr;
525 	Nfs3Wcc dirWcc;
526 };
527 
528 struct Nfs3TMkdir {
529 	Nfs3Call call;
530 	Nfs3Handle handle;
531 	char *name;
532 	Nfs3SetAttr attr;
533 };
534 
535 struct Nfs3RMkdir {
536 	Nfs3Call call;
537 	Nfs3Status status;
538 	u1int haveHandle;
539 	Nfs3Handle handle;
540 	u1int haveAttr;
541 	Nfs3Attr attr;
542 	Nfs3Wcc dirWcc;
543 };
544 
545 struct Nfs3TSymlink {
546 	Nfs3Call call;
547 	Nfs3Handle handle;
548 	char *name;
549 	Nfs3SetAttr attr;
550 	char *data;
551 };
552 
553 struct Nfs3RSymlink {
554 	Nfs3Call call;
555 	Nfs3Status status;
556 	u1int haveHandle;
557 	Nfs3Handle handle;
558 	u1int haveAttr;
559 	Nfs3Attr attr;
560 	Nfs3Wcc dirWcc;
561 };
562 
563 struct Nfs3TMknod {
564 	Nfs3Call call;
565 	Nfs3Handle handle;
566 	char *name;
567 	Nfs3FileType type;
568 	Nfs3SetAttr attr;
569 	u32int major;
570 	u32int minor;
571 };
572 
573 struct Nfs3RMknod {
574 	Nfs3Call call;
575 	Nfs3Status status;
576 	u1int haveHandle;
577 	Nfs3Handle handle;
578 	u1int haveAttr;
579 	Nfs3Attr attr;
580 	Nfs3Wcc dirWcc;
581 };
582 
583 struct Nfs3TRemove {
584 	Nfs3Call call;
585 	Nfs3Handle handle;
586 	char *name;
587 };
588 
589 struct Nfs3RRemove {
590 	Nfs3Call call;
591 	Nfs3Status status;
592 	Nfs3Wcc wcc;
593 };
594 
595 struct Nfs3TRmdir {
596 	Nfs3Call call;
597 	Nfs3Handle handle;
598 	char *name;
599 };
600 
601 struct Nfs3RRmdir {
602 	Nfs3Call call;
603 	Nfs3Status status;
604 	Nfs3Wcc wcc;
605 };
606 
607 struct Nfs3TRename {
608 	Nfs3Call call;
609 	struct {
610 		Nfs3Handle handle;
611 		char *name;
612 	} from;
613 	struct {
614 		Nfs3Handle handle;
615 		char *name;
616 	} to;
617 };
618 
619 struct Nfs3RRename {
620 	Nfs3Call call;
621 	Nfs3Status status;
622 	Nfs3Wcc fromWcc;
623 	Nfs3Wcc toWcc;
624 };
625 
626 struct Nfs3TLink {
627 	Nfs3Call call;
628 	Nfs3Handle handle;
629 	struct {
630 		Nfs3Handle handle;
631 		char *name;
632 	} link;
633 };
634 
635 struct Nfs3RLink {
636 	Nfs3Call call;
637 	Nfs3Status status;
638 	u1int haveAttr;
639 	Nfs3Attr attr;
640 	Nfs3Wcc dirWcc;
641 };
642 
643 struct Nfs3TReadDir {
644 	Nfs3Call call;
645 	Nfs3Handle handle;
646 	u64int cookie;
647 	uchar verf[Nfs3CookieVerfSize];
648 	u32int count;
649 };
650 
651 struct Nfs3RReadDir {
652 	Nfs3Call call;
653 	Nfs3Status status;
654 	u1int haveAttr;
655 	Nfs3Attr attr;
656 	uchar verf[Nfs3CookieVerfSize];
657 	uchar *data;
658 	u32int count;
659 	u1int eof;
660 };
661 
662 struct Nfs3TReadDirPlus {
663 	Nfs3Call call;
664 	Nfs3Handle handle;
665 	u64int cookie;
666 	uchar verf[Nfs3CookieVerfSize];
667 	u32int dirCount;
668 	u32int maxCount;
669 };
670 
671 struct Nfs3Entry {
672 	u64int fileid;
673 	char *name;
674 	u64int cookie;
675 	u1int haveAttr;
676 	Nfs3Attr attr;
677 	u1int haveHandle;
678 	Nfs3Handle handle;
679 };
680 
681 struct Nfs3RReadDirPlus {
682 	Nfs3Call call;
683 	Nfs3Status status;
684 	u1int haveAttr;
685 	Nfs3Attr attr;
686 	uchar verf[Nfs3CookieVerfSize];
687 	uchar *data;
688 	u32int count;
689 	u1int eof;
690 };
691 
692 struct Nfs3TFsStat {
693 	Nfs3Call call;
694 	Nfs3Handle handle;
695 };
696 
697 struct Nfs3RFsStat {
698 	Nfs3Call call;
699 	Nfs3Status status;
700 	u1int haveAttr;
701 	Nfs3Attr attr;
702 	u64int totalBytes;
703 	u64int freeBytes;
704 	u64int availBytes;
705 	u64int totalFiles;
706 	u64int freeFiles;
707 	u64int availFiles;
708 	u32int invarSec;
709 };
710 
711 struct Nfs3TFsInfo {
712 	Nfs3Call call;
713 	Nfs3Handle handle;
714 };
715 
716 struct Nfs3RFsInfo {
717 	Nfs3Call call;
718 	Nfs3Status status;
719 	u1int haveAttr;
720 	Nfs3Attr attr;
721 	u32int readMax;
722 	u32int readPref;
723 	u32int readMult;
724 	u32int writeMax;
725 	u32int writePref;
726 	u32int writeMult;
727 	u32int readDirPref;
728 	u64int maxFileSize;
729 	Nfs3Time timePrec;
730 	u32int flags;
731 };
732 
733 struct Nfs3TPathconf {
734 	Nfs3Call call;
735 	Nfs3Handle handle;
736 };
737 
738 struct Nfs3RPathconf {
739 	Nfs3Call call;
740 	Nfs3Status status;
741 	u1int haveAttr;
742 	Nfs3Attr attr;
743 	u32int maxLink;
744 	u32int maxName;
745 	u1int noTrunc;
746 	u1int chownRestricted;
747 	u1int caseInsensitive;
748 	u1int casePreserving;
749 };
750 
751 struct Nfs3TCommit {
752 	Nfs3Call call;
753 	Nfs3Handle handle;
754 	u64int offset;
755 	u32int count;
756 };
757 
758 struct Nfs3RCommit {
759 	Nfs3Call call;
760 	Nfs3Status status;
761 	Nfs3Wcc wcc;
762 	uchar verf[Nfs3WriteVerfSize];
763 };
764 
765 char *nfs3StatusStr(Nfs3Status);
766 char *nfs3TypeStr(Nfs3CallType);
767 char *nfs3SetTimeStr(Nfs3SetTime);
768 char *nfs3SyncStr(Nfs3Sync);
769 
770 void nfs3HandlePrint(Fmt*, Nfs3Handle*);
771 u32int nfs3HandleSize(Nfs3Handle*);
772 int nfs3HandlePack(uchar*, uchar*, uchar**, Nfs3Handle*);
773 int nfs3HandleUnpack(uchar*, uchar*, uchar**, Nfs3Handle*);
774 
775 void nfs3TimePrint(Fmt*, Nfs3Time*);
776 u32int nfs3TimeSize(Nfs3Time*);
777 int nfs3TimePack(uchar*, uchar*, uchar**, Nfs3Time*);
778 int nfs3TimeUnpack(uchar*, uchar*, uchar**, Nfs3Time*);
779 
780 void nfs3AttrPrint(Fmt*, Nfs3Attr*);
781 u32int nfs3AttrSize(Nfs3Attr*);
782 int nfs3AttrPack(uchar*, uchar*, uchar**, Nfs3Attr*);
783 int nfs3AttrUnpack(uchar*, uchar*, uchar**, Nfs3Attr*);
784 
785 void nfs3WccAttrPrint(Fmt*, Nfs3WccAttr*);
786 u32int nfs3WccAttrSize(Nfs3WccAttr*);
787 int nfs3WccAttrPack(uchar*, uchar*, uchar**, Nfs3WccAttr*);
788 int nfs3WccAttrUnpack(uchar*, uchar*, uchar**, Nfs3WccAttr*);
789 
790 void nfs3WccPrint(Fmt*, Nfs3Wcc*);
791 u32int nfs3WccSize(Nfs3Wcc*);
792 int nfs3WccPack(uchar*, uchar*, uchar**, Nfs3Wcc*);
793 int nfs3WccUnpack(uchar*, uchar*, uchar**, Nfs3Wcc*);
794 
795 void nfs3SetAttrPrint(Fmt*, Nfs3SetAttr*);
796 u32int nfs3SetAttrSize(Nfs3SetAttr*);
797 int nfs3SetAttrPack(uchar*, uchar*, uchar**, Nfs3SetAttr*);
798 int nfs3SetAttrUnpack(uchar*, uchar*, uchar**, Nfs3SetAttr*);
799 
800 extern SunProg nfs3Prog;
801 
802 void nfs3EntryPrint(Fmt*, Nfs3Entry*);
803 u32int nfs3EntrySize(Nfs3Entry*);
804 int nfs3EntryPack(uchar*, uchar*, uchar**, Nfs3Entry*);
805 int nfs3EntryUnpack(uchar*, uchar*, uchar**, Nfs3Entry*);
806 
807 void nfs3EntryPlusPrint(Fmt*, Nfs3Entry*);
808 u32int nfs3EntryPlusSize(Nfs3Entry*);
809 int nfs3EntryPlusPack(uchar*, uchar*, uchar**, Nfs3Entry*);
810 int nfs3EntryPlusUnpack(uchar*, uchar*, uchar**, Nfs3Entry*);
811 
812