xref: /onnv-gate/usr/src/head/rpcsvc/nfs_prot.x (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate %#pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate #ifdef RPC_HDR
30*0Sstevel@tonic-gate %
31*0Sstevel@tonic-gate %/*
32*0Sstevel@tonic-gate % * Definitions for uint64, int64, uint32, and int32
33*0Sstevel@tonic-gate % */
34*0Sstevel@tonic-gate %#include <rpc/rpc_sztypes.h>
35*0Sstevel@tonic-gate %
36*0Sstevel@tonic-gate #endif
37*0Sstevel@tonic-gate 
38*0Sstevel@tonic-gate const NFS_PORT          = 2049;
39*0Sstevel@tonic-gate const NFS_MAXDATA       = 8192;
40*0Sstevel@tonic-gate const NFS_MAXPATHLEN    = 1024;
41*0Sstevel@tonic-gate const NFS_MAXNAMLEN	= 255;
42*0Sstevel@tonic-gate const NFS_FHSIZE	= 32;
43*0Sstevel@tonic-gate const NFS_COOKIESIZE	= 4;
44*0Sstevel@tonic-gate const NFS_FIFO_DEV	= -1;	/* size kludge for named pipes */
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate /*
47*0Sstevel@tonic-gate  * File types
48*0Sstevel@tonic-gate  */
49*0Sstevel@tonic-gate const NFSMODE_FMT  = 0170000;	/* type of file */
50*0Sstevel@tonic-gate const NFSMODE_DIR  = 0040000;	/* directory */
51*0Sstevel@tonic-gate const NFSMODE_CHR  = 0020000;	/* character special */
52*0Sstevel@tonic-gate const NFSMODE_BLK  = 0060000;	/* block special */
53*0Sstevel@tonic-gate const NFSMODE_REG  = 0100000;	/* regular */
54*0Sstevel@tonic-gate const NFSMODE_LNK  = 0120000;	/* symbolic link */
55*0Sstevel@tonic-gate const NFSMODE_SOCK = 0140000;	/* socket */
56*0Sstevel@tonic-gate const NFSMODE_FIFO = 0010000;	/* fifo */
57*0Sstevel@tonic-gate 
58*0Sstevel@tonic-gate /*
59*0Sstevel@tonic-gate  * Error status
60*0Sstevel@tonic-gate  */
61*0Sstevel@tonic-gate enum nfsstat {
62*0Sstevel@tonic-gate 	NFS_OK= 0,		/* no error */
63*0Sstevel@tonic-gate 	NFSERR_PERM=1,		/* Not owner */
64*0Sstevel@tonic-gate 	NFSERR_NOENT=2,		/* No such file or directory */
65*0Sstevel@tonic-gate 	NFSERR_IO=5,		/* I/O error */
66*0Sstevel@tonic-gate 	NFSERR_NXIO=6,		/* No such device or address */
67*0Sstevel@tonic-gate 	NFSERR_ACCES=13,	/* Permission denied */
68*0Sstevel@tonic-gate 	NFSERR_EXIST=17,	/* File exists */
69*0Sstevel@tonic-gate 	NFSERR_XDEV=18,		/* Cross-device link */
70*0Sstevel@tonic-gate 	NFSERR_NODEV=19,	/* No such device */
71*0Sstevel@tonic-gate 	NFSERR_NOTDIR=20,	/* Not a directory*/
72*0Sstevel@tonic-gate 	NFSERR_ISDIR=21,	/* Is a directory */
73*0Sstevel@tonic-gate 	NFSERR_INVAL=22,	/* Invalid argument */
74*0Sstevel@tonic-gate 	NFSERR_FBIG=27,		/* File too large */
75*0Sstevel@tonic-gate 	NFSERR_NOSPC=28,	/* No space left on device */
76*0Sstevel@tonic-gate 	NFSERR_ROFS=30,		/* Read-only file system */
77*0Sstevel@tonic-gate 	NFSERR_OPNOTSUPP=45,	/* Operation not supported */
78*0Sstevel@tonic-gate 	NFSERR_NAMETOOLONG=63,	/* File name too long */
79*0Sstevel@tonic-gate 	NFSERR_NOTEMPTY=66,	/* Directory not empty */
80*0Sstevel@tonic-gate 	NFSERR_DQUOT=69,	/* Disc quota exceeded */
81*0Sstevel@tonic-gate 	NFSERR_STALE=70,	/* Stale NFS file handle */
82*0Sstevel@tonic-gate 	NFSERR_REMOTE=71,	/* Object is remote */
83*0Sstevel@tonic-gate 	NFSERR_WFLUSH=72	/* write cache flushed */
84*0Sstevel@tonic-gate };
85*0Sstevel@tonic-gate 
86*0Sstevel@tonic-gate /*
87*0Sstevel@tonic-gate  * File types
88*0Sstevel@tonic-gate  */
89*0Sstevel@tonic-gate enum ftype {
90*0Sstevel@tonic-gate 	NFNON = 0,	/* non-file */
91*0Sstevel@tonic-gate 	NFREG = 1,	/* regular file */
92*0Sstevel@tonic-gate 	NFDIR = 2,	/* directory */
93*0Sstevel@tonic-gate 	NFBLK = 3,	/* block special */
94*0Sstevel@tonic-gate 	NFCHR = 4,	/* character special */
95*0Sstevel@tonic-gate 	NFLNK = 5,	/* symbolic link */
96*0Sstevel@tonic-gate 	NFSOCK = 6,	/* unix domain sockets */
97*0Sstevel@tonic-gate 	NFBAD = 7,	/* unused */
98*0Sstevel@tonic-gate 	NFFIFO = 8 	/* named pipe */
99*0Sstevel@tonic-gate };
100*0Sstevel@tonic-gate 
101*0Sstevel@tonic-gate /*
102*0Sstevel@tonic-gate  * File access handle
103*0Sstevel@tonic-gate  */
104*0Sstevel@tonic-gate struct nfs_fh {
105*0Sstevel@tonic-gate 	opaque data[NFS_FHSIZE];
106*0Sstevel@tonic-gate };
107*0Sstevel@tonic-gate 
108*0Sstevel@tonic-gate /*
109*0Sstevel@tonic-gate  * Timeval
110*0Sstevel@tonic-gate  */
111*0Sstevel@tonic-gate struct nfstime {
112*0Sstevel@tonic-gate 	unsigned seconds;
113*0Sstevel@tonic-gate 	unsigned useconds;
114*0Sstevel@tonic-gate };
115*0Sstevel@tonic-gate 
116*0Sstevel@tonic-gate 
117*0Sstevel@tonic-gate /*
118*0Sstevel@tonic-gate  * File attributes
119*0Sstevel@tonic-gate  */
120*0Sstevel@tonic-gate struct fattr {
121*0Sstevel@tonic-gate 	ftype type;		/* file type */
122*0Sstevel@tonic-gate 	unsigned mode;		/* protection mode bits */
123*0Sstevel@tonic-gate 	unsigned nlink;		/* # hard links */
124*0Sstevel@tonic-gate 	unsigned uid;		/* owner user id */
125*0Sstevel@tonic-gate 	unsigned gid;		/* owner group id */
126*0Sstevel@tonic-gate 	unsigned size;		/* file size in bytes */
127*0Sstevel@tonic-gate 	unsigned blocksize;	/* prefered block size */
128*0Sstevel@tonic-gate 	unsigned rdev;		/* special device # */
129*0Sstevel@tonic-gate 	unsigned blocks;	/* Kb of disk used by file */
130*0Sstevel@tonic-gate 	unsigned fsid;		/* device # */
131*0Sstevel@tonic-gate 	unsigned fileid;	/* inode # */
132*0Sstevel@tonic-gate 	nfstime	atime;		/* time of last access */
133*0Sstevel@tonic-gate 	nfstime	mtime;		/* time of last modification */
134*0Sstevel@tonic-gate 	nfstime	ctime;		/* time of last change */
135*0Sstevel@tonic-gate };
136*0Sstevel@tonic-gate 
137*0Sstevel@tonic-gate /*
138*0Sstevel@tonic-gate  * File attributes which can be set
139*0Sstevel@tonic-gate  */
140*0Sstevel@tonic-gate struct sattr {
141*0Sstevel@tonic-gate 	unsigned mode;	/* protection mode bits */
142*0Sstevel@tonic-gate 	unsigned uid;	/* owner user id */
143*0Sstevel@tonic-gate 	unsigned gid;	/* owner group id */
144*0Sstevel@tonic-gate 	unsigned size;	/* file size in bytes */
145*0Sstevel@tonic-gate 	nfstime	atime;	/* time of last access */
146*0Sstevel@tonic-gate 	nfstime	mtime;	/* time of last modification */
147*0Sstevel@tonic-gate };
148*0Sstevel@tonic-gate 
149*0Sstevel@tonic-gate 
150*0Sstevel@tonic-gate typedef string filename<NFS_MAXNAMLEN>;
151*0Sstevel@tonic-gate typedef string nfspath<NFS_MAXPATHLEN>;
152*0Sstevel@tonic-gate 
153*0Sstevel@tonic-gate /*
154*0Sstevel@tonic-gate  * Reply status with file attributes
155*0Sstevel@tonic-gate  */
156*0Sstevel@tonic-gate union attrstat switch (nfsstat status) {
157*0Sstevel@tonic-gate case NFS_OK:
158*0Sstevel@tonic-gate 	fattr attributes;
159*0Sstevel@tonic-gate default:
160*0Sstevel@tonic-gate 	void;
161*0Sstevel@tonic-gate };
162*0Sstevel@tonic-gate 
163*0Sstevel@tonic-gate struct sattrargs {
164*0Sstevel@tonic-gate 	nfs_fh file;
165*0Sstevel@tonic-gate 	sattr attributes;
166*0Sstevel@tonic-gate };
167*0Sstevel@tonic-gate 
168*0Sstevel@tonic-gate /*
169*0Sstevel@tonic-gate  * Arguments for directory operations
170*0Sstevel@tonic-gate  */
171*0Sstevel@tonic-gate struct diropargs {
172*0Sstevel@tonic-gate 	nfs_fh	dir;	/* directory file handle */
173*0Sstevel@tonic-gate 	filename name;		/* name (up to NFS_MAXNAMLEN bytes) */
174*0Sstevel@tonic-gate };
175*0Sstevel@tonic-gate 
176*0Sstevel@tonic-gate struct diropokres {
177*0Sstevel@tonic-gate 	nfs_fh file;
178*0Sstevel@tonic-gate 	fattr attributes;
179*0Sstevel@tonic-gate };
180*0Sstevel@tonic-gate 
181*0Sstevel@tonic-gate /*
182*0Sstevel@tonic-gate  * Results from directory operation
183*0Sstevel@tonic-gate  */
184*0Sstevel@tonic-gate union diropres switch (nfsstat status) {
185*0Sstevel@tonic-gate case NFS_OK:
186*0Sstevel@tonic-gate 	diropokres diropres;
187*0Sstevel@tonic-gate default:
188*0Sstevel@tonic-gate 	void;
189*0Sstevel@tonic-gate };
190*0Sstevel@tonic-gate 
191*0Sstevel@tonic-gate union readlinkres switch (nfsstat status) {
192*0Sstevel@tonic-gate case NFS_OK:
193*0Sstevel@tonic-gate 	nfspath data;
194*0Sstevel@tonic-gate default:
195*0Sstevel@tonic-gate 	void;
196*0Sstevel@tonic-gate };
197*0Sstevel@tonic-gate 
198*0Sstevel@tonic-gate /*
199*0Sstevel@tonic-gate  * Arguments to remote read
200*0Sstevel@tonic-gate  */
201*0Sstevel@tonic-gate struct readargs {
202*0Sstevel@tonic-gate 	nfs_fh file;		/* handle for file */
203*0Sstevel@tonic-gate 	unsigned offset;	/* byte offset in file */
204*0Sstevel@tonic-gate 	unsigned count;		/* immediate read count */
205*0Sstevel@tonic-gate 	unsigned totalcount;	/* total read count (from this offset)*/
206*0Sstevel@tonic-gate };
207*0Sstevel@tonic-gate 
208*0Sstevel@tonic-gate /*
209*0Sstevel@tonic-gate  * Status OK portion of remote read reply
210*0Sstevel@tonic-gate  */
211*0Sstevel@tonic-gate struct readokres {
212*0Sstevel@tonic-gate 	fattr	attributes;	/* attributes, need for pagin*/
213*0Sstevel@tonic-gate 	opaque data<NFS_MAXDATA>;
214*0Sstevel@tonic-gate };
215*0Sstevel@tonic-gate 
216*0Sstevel@tonic-gate union readres switch (nfsstat status) {
217*0Sstevel@tonic-gate case NFS_OK:
218*0Sstevel@tonic-gate 	readokres reply;
219*0Sstevel@tonic-gate default:
220*0Sstevel@tonic-gate 	void;
221*0Sstevel@tonic-gate };
222*0Sstevel@tonic-gate 
223*0Sstevel@tonic-gate /*
224*0Sstevel@tonic-gate  * Arguments to remote write
225*0Sstevel@tonic-gate  */
226*0Sstevel@tonic-gate struct writeargs {
227*0Sstevel@tonic-gate 	nfs_fh	file;		/* handle for file */
228*0Sstevel@tonic-gate 	unsigned beginoffset;	/* beginning byte offset in file */
229*0Sstevel@tonic-gate 	unsigned offset;	/* current byte offset in file */
230*0Sstevel@tonic-gate 	unsigned totalcount;	/* total write count (to this offset)*/
231*0Sstevel@tonic-gate 	opaque data<NFS_MAXDATA>;
232*0Sstevel@tonic-gate };
233*0Sstevel@tonic-gate 
234*0Sstevel@tonic-gate struct createargs {
235*0Sstevel@tonic-gate 	diropargs where;
236*0Sstevel@tonic-gate 	sattr attributes;
237*0Sstevel@tonic-gate };
238*0Sstevel@tonic-gate 
239*0Sstevel@tonic-gate struct renameargs {
240*0Sstevel@tonic-gate 	diropargs from;
241*0Sstevel@tonic-gate 	diropargs to;
242*0Sstevel@tonic-gate };
243*0Sstevel@tonic-gate 
244*0Sstevel@tonic-gate struct linkargs {
245*0Sstevel@tonic-gate 	nfs_fh from;
246*0Sstevel@tonic-gate 	diropargs to;
247*0Sstevel@tonic-gate };
248*0Sstevel@tonic-gate 
249*0Sstevel@tonic-gate struct symlinkargs {
250*0Sstevel@tonic-gate 	diropargs from;
251*0Sstevel@tonic-gate 	nfspath to;
252*0Sstevel@tonic-gate 	sattr attributes;
253*0Sstevel@tonic-gate };
254*0Sstevel@tonic-gate 
255*0Sstevel@tonic-gate 
256*0Sstevel@tonic-gate typedef opaque nfscookie[NFS_COOKIESIZE];
257*0Sstevel@tonic-gate 
258*0Sstevel@tonic-gate /*
259*0Sstevel@tonic-gate  * Arguments to readdir
260*0Sstevel@tonic-gate  */
261*0Sstevel@tonic-gate struct readdirargs {
262*0Sstevel@tonic-gate 	nfs_fh dir;		/* directory handle */
263*0Sstevel@tonic-gate 	nfscookie cookie;
264*0Sstevel@tonic-gate 	unsigned count;		/* number of directory bytes to read */
265*0Sstevel@tonic-gate };
266*0Sstevel@tonic-gate 
267*0Sstevel@tonic-gate struct entry {
268*0Sstevel@tonic-gate 	unsigned fileid;
269*0Sstevel@tonic-gate 	filename name;
270*0Sstevel@tonic-gate 	nfscookie cookie;
271*0Sstevel@tonic-gate 	entry *nextentry;
272*0Sstevel@tonic-gate };
273*0Sstevel@tonic-gate 
274*0Sstevel@tonic-gate struct dirlist {
275*0Sstevel@tonic-gate 	entry *entries;
276*0Sstevel@tonic-gate 	bool eof;
277*0Sstevel@tonic-gate };
278*0Sstevel@tonic-gate 
279*0Sstevel@tonic-gate union readdirres switch (nfsstat status) {
280*0Sstevel@tonic-gate case NFS_OK:
281*0Sstevel@tonic-gate 	dirlist reply;
282*0Sstevel@tonic-gate default:
283*0Sstevel@tonic-gate 	void;
284*0Sstevel@tonic-gate };
285*0Sstevel@tonic-gate 
286*0Sstevel@tonic-gate struct statfsokres {
287*0Sstevel@tonic-gate 	unsigned tsize;	/* preferred transfer size in bytes */
288*0Sstevel@tonic-gate 	unsigned bsize;	/* fundamental file system block size */
289*0Sstevel@tonic-gate 	unsigned blocks;	/* total blocks in file system */
290*0Sstevel@tonic-gate 	unsigned bfree;	/* free blocks in fs */
291*0Sstevel@tonic-gate 	unsigned bavail;	/* free blocks avail to non-superuser */
292*0Sstevel@tonic-gate };
293*0Sstevel@tonic-gate 
294*0Sstevel@tonic-gate union statfsres switch (nfsstat status) {
295*0Sstevel@tonic-gate case NFS_OK:
296*0Sstevel@tonic-gate 	statfsokres reply;
297*0Sstevel@tonic-gate default:
298*0Sstevel@tonic-gate 	void;
299*0Sstevel@tonic-gate };
300*0Sstevel@tonic-gate 
301*0Sstevel@tonic-gate /*
302*0Sstevel@tonic-gate  * Remote file service routines
303*0Sstevel@tonic-gate  */
304*0Sstevel@tonic-gate program NFS_PROGRAM {
305*0Sstevel@tonic-gate 	version NFS_VERSION {
306*0Sstevel@tonic-gate 		void
307*0Sstevel@tonic-gate 		NFSPROC_NULL(void) = 0;
308*0Sstevel@tonic-gate 
309*0Sstevel@tonic-gate 		attrstat
310*0Sstevel@tonic-gate 		NFSPROC_GETATTR(nfs_fh) =	1;
311*0Sstevel@tonic-gate 
312*0Sstevel@tonic-gate 		attrstat
313*0Sstevel@tonic-gate 		NFSPROC_SETATTR(sattrargs) = 2;
314*0Sstevel@tonic-gate 
315*0Sstevel@tonic-gate 		void
316*0Sstevel@tonic-gate 		NFSPROC_ROOT(void) = 3;
317*0Sstevel@tonic-gate 
318*0Sstevel@tonic-gate 		diropres
319*0Sstevel@tonic-gate 		NFSPROC_LOOKUP(diropargs) = 4;
320*0Sstevel@tonic-gate 
321*0Sstevel@tonic-gate 		readlinkres
322*0Sstevel@tonic-gate 		NFSPROC_READLINK(nfs_fh) = 5;
323*0Sstevel@tonic-gate 
324*0Sstevel@tonic-gate 		readres
325*0Sstevel@tonic-gate 		NFSPROC_READ(readargs) = 6;
326*0Sstevel@tonic-gate 
327*0Sstevel@tonic-gate 		void
328*0Sstevel@tonic-gate 		NFSPROC_WRITECACHE(void) = 7;
329*0Sstevel@tonic-gate 
330*0Sstevel@tonic-gate 		attrstat
331*0Sstevel@tonic-gate 		NFSPROC_WRITE(writeargs) = 8;
332*0Sstevel@tonic-gate 
333*0Sstevel@tonic-gate 		diropres
334*0Sstevel@tonic-gate 		NFSPROC_CREATE(createargs) = 9;
335*0Sstevel@tonic-gate 
336*0Sstevel@tonic-gate 		nfsstat
337*0Sstevel@tonic-gate 		NFSPROC_REMOVE(diropargs) = 10;
338*0Sstevel@tonic-gate 
339*0Sstevel@tonic-gate 		nfsstat
340*0Sstevel@tonic-gate 		NFSPROC_RENAME(renameargs) = 11;
341*0Sstevel@tonic-gate 
342*0Sstevel@tonic-gate 		nfsstat
343*0Sstevel@tonic-gate 		NFSPROC_LINK(linkargs) = 12;
344*0Sstevel@tonic-gate 
345*0Sstevel@tonic-gate 		nfsstat
346*0Sstevel@tonic-gate 		NFSPROC_SYMLINK(symlinkargs) = 13;
347*0Sstevel@tonic-gate 
348*0Sstevel@tonic-gate 		diropres
349*0Sstevel@tonic-gate 		NFSPROC_MKDIR(createargs) = 14;
350*0Sstevel@tonic-gate 
351*0Sstevel@tonic-gate 		nfsstat
352*0Sstevel@tonic-gate 		NFSPROC_RMDIR(diropargs) = 15;
353*0Sstevel@tonic-gate 
354*0Sstevel@tonic-gate 		readdirres
355*0Sstevel@tonic-gate 		NFSPROC_READDIR(readdirargs) = 16;
356*0Sstevel@tonic-gate 
357*0Sstevel@tonic-gate 		statfsres
358*0Sstevel@tonic-gate 		NFSPROC_STATFS(nfs_fh) = 17;
359*0Sstevel@tonic-gate 	} = 2;
360*0Sstevel@tonic-gate } = 100003;
361*0Sstevel@tonic-gate 
362*0Sstevel@tonic-gate /*
363*0Sstevel@tonic-gate  * Version 3 declarations and definitions.
364*0Sstevel@tonic-gate  */
365*0Sstevel@tonic-gate 
366*0Sstevel@tonic-gate /*
367*0Sstevel@tonic-gate  * Sizes
368*0Sstevel@tonic-gate  */
369*0Sstevel@tonic-gate const NFS3_FHSIZE         = 64;
370*0Sstevel@tonic-gate const NFS3_COOKIEVERFSIZE = 8;
371*0Sstevel@tonic-gate const NFS3_CREATEVERFSIZE = 8;
372*0Sstevel@tonic-gate const NFS3_WRITEVERFSIZE  = 8;
373*0Sstevel@tonic-gate 
374*0Sstevel@tonic-gate /*
375*0Sstevel@tonic-gate  * Basic data types
376*0Sstevel@tonic-gate  */
377*0Sstevel@tonic-gate typedef string		filename3<>;
378*0Sstevel@tonic-gate typedef string		nfspath3<>;
379*0Sstevel@tonic-gate typedef uint64		fileid3;
380*0Sstevel@tonic-gate typedef uint64		cookie3;
381*0Sstevel@tonic-gate typedef opaque		cookieverf3[NFS3_COOKIEVERFSIZE];
382*0Sstevel@tonic-gate typedef opaque		createverf3[NFS3_CREATEVERFSIZE];
383*0Sstevel@tonic-gate typedef opaque		writeverf3[NFS3_WRITEVERFSIZE];
384*0Sstevel@tonic-gate typedef uint32		uid3;
385*0Sstevel@tonic-gate typedef uint32		gid3;
386*0Sstevel@tonic-gate typedef uint64		size3;
387*0Sstevel@tonic-gate typedef uint64		offset3;
388*0Sstevel@tonic-gate typedef uint32		mode3;
389*0Sstevel@tonic-gate typedef uint32		count3;
390*0Sstevel@tonic-gate 
391*0Sstevel@tonic-gate /*
392*0Sstevel@tonic-gate  * Error status
393*0Sstevel@tonic-gate  */
394*0Sstevel@tonic-gate enum nfsstat3 {
395*0Sstevel@tonic-gate 	NFS3_OK = 0,
396*0Sstevel@tonic-gate 	NFS3ERR_PERM = 1,
397*0Sstevel@tonic-gate 	NFS3ERR_NOENT = 2,
398*0Sstevel@tonic-gate 	NFS3ERR_IO = 5,
399*0Sstevel@tonic-gate 	NFS3ERR_NXIO = 6,
400*0Sstevel@tonic-gate 	NFS3ERR_ACCES = 13,
401*0Sstevel@tonic-gate 	NFS3ERR_EXIST = 17,
402*0Sstevel@tonic-gate 	NFS3ERR_XDEV = 18,
403*0Sstevel@tonic-gate 	NFS3ERR_NODEV = 19,
404*0Sstevel@tonic-gate 	NFS3ERR_NOTDIR = 20,
405*0Sstevel@tonic-gate 	NFS3ERR_ISDIR = 21,
406*0Sstevel@tonic-gate 	NFS3ERR_INVAL = 22,
407*0Sstevel@tonic-gate 	NFS3ERR_FBIG = 27,
408*0Sstevel@tonic-gate 	NFS3ERR_NOSPC = 28,
409*0Sstevel@tonic-gate 	NFS3ERR_ROFS = 30,
410*0Sstevel@tonic-gate 	NFS3ERR_MLINK = 31,
411*0Sstevel@tonic-gate 	NFS3ERR_NAMETOOLONG = 63,
412*0Sstevel@tonic-gate 	NFS3ERR_NOTEMPTY = 66,
413*0Sstevel@tonic-gate 	NFS3ERR_DQUOT = 69,
414*0Sstevel@tonic-gate 	NFS3ERR_STALE = 70,
415*0Sstevel@tonic-gate 	NFS3ERR_REMOTE = 71,
416*0Sstevel@tonic-gate 	NFS3ERR_BADHANDLE = 10001,
417*0Sstevel@tonic-gate 	NFS3ERR_NOT_SYNC = 10002,
418*0Sstevel@tonic-gate 	NFS3ERR_BAD_COOKIE = 10003,
419*0Sstevel@tonic-gate 	NFS3ERR_NOTSUPP = 10004,
420*0Sstevel@tonic-gate 	NFS3ERR_TOOSMALL = 10005,
421*0Sstevel@tonic-gate 	NFS3ERR_SERVERFAULT = 10006,
422*0Sstevel@tonic-gate 	NFS3ERR_BADTYPE = 10007,
423*0Sstevel@tonic-gate 	NFS3ERR_JUKEBOX = 10008
424*0Sstevel@tonic-gate };
425*0Sstevel@tonic-gate 
426*0Sstevel@tonic-gate /*
427*0Sstevel@tonic-gate  * File types
428*0Sstevel@tonic-gate  */
429*0Sstevel@tonic-gate enum ftype3 {
430*0Sstevel@tonic-gate 	NF3REG = 1,
431*0Sstevel@tonic-gate 	NF3DIR = 2,
432*0Sstevel@tonic-gate 	NF3BLK = 3,
433*0Sstevel@tonic-gate 	NF3CHR = 4,
434*0Sstevel@tonic-gate 	NF3LNK = 5,
435*0Sstevel@tonic-gate 	NF3SOCK = 6,
436*0Sstevel@tonic-gate 	NF3FIFO = 7
437*0Sstevel@tonic-gate };
438*0Sstevel@tonic-gate 
439*0Sstevel@tonic-gate struct specdata3 {
440*0Sstevel@tonic-gate 	uint32	specdata1;
441*0Sstevel@tonic-gate 	uint32	specdata2;
442*0Sstevel@tonic-gate };
443*0Sstevel@tonic-gate 
444*0Sstevel@tonic-gate /*
445*0Sstevel@tonic-gate  * File access handle
446*0Sstevel@tonic-gate  */
447*0Sstevel@tonic-gate struct nfs_fh3 {
448*0Sstevel@tonic-gate 	opaque data<NFS3_FHSIZE>;
449*0Sstevel@tonic-gate };
450*0Sstevel@tonic-gate 
451*0Sstevel@tonic-gate /*
452*0Sstevel@tonic-gate  * Timeval
453*0Sstevel@tonic-gate  */
454*0Sstevel@tonic-gate struct nfstime3 {
455*0Sstevel@tonic-gate 	uint32 seconds;
456*0Sstevel@tonic-gate 	uint32 nseconds;
457*0Sstevel@tonic-gate };
458*0Sstevel@tonic-gate 
459*0Sstevel@tonic-gate /*
460*0Sstevel@tonic-gate  * File attributes
461*0Sstevel@tonic-gate  */
462*0Sstevel@tonic-gate struct fattr3 {
463*0Sstevel@tonic-gate 	ftype3	  type;
464*0Sstevel@tonic-gate 	mode3	  mode;
465*0Sstevel@tonic-gate 	uint32	  nlink;
466*0Sstevel@tonic-gate 	uid3	  uid;
467*0Sstevel@tonic-gate 	gid3	  gid;
468*0Sstevel@tonic-gate 	size3	  size;
469*0Sstevel@tonic-gate 	size3	  used;
470*0Sstevel@tonic-gate 	specdata3 rdev;
471*0Sstevel@tonic-gate 	uint64	  fsid;
472*0Sstevel@tonic-gate 	fileid3	  fileid;
473*0Sstevel@tonic-gate 	nfstime3  atime;
474*0Sstevel@tonic-gate 	nfstime3  mtime;
475*0Sstevel@tonic-gate 	nfstime3  ctime;
476*0Sstevel@tonic-gate };
477*0Sstevel@tonic-gate 
478*0Sstevel@tonic-gate /*
479*0Sstevel@tonic-gate  * File attributes
480*0Sstevel@tonic-gate  */
481*0Sstevel@tonic-gate union post_op_attr switch (bool attributes_follow) {
482*0Sstevel@tonic-gate case TRUE:
483*0Sstevel@tonic-gate 	fattr3 attributes;
484*0Sstevel@tonic-gate case FALSE:
485*0Sstevel@tonic-gate 	void;
486*0Sstevel@tonic-gate };
487*0Sstevel@tonic-gate 
488*0Sstevel@tonic-gate struct wcc_attr {
489*0Sstevel@tonic-gate 	size3	 size;
490*0Sstevel@tonic-gate 	nfstime3 mtime;
491*0Sstevel@tonic-gate 	nfstime3 ctime;
492*0Sstevel@tonic-gate };
493*0Sstevel@tonic-gate 
494*0Sstevel@tonic-gate union pre_op_attr switch (bool attributes_follow) {
495*0Sstevel@tonic-gate case TRUE:
496*0Sstevel@tonic-gate 	wcc_attr attributes;
497*0Sstevel@tonic-gate case FALSE:
498*0Sstevel@tonic-gate 	void;
499*0Sstevel@tonic-gate };
500*0Sstevel@tonic-gate 
501*0Sstevel@tonic-gate struct wcc_data {
502*0Sstevel@tonic-gate 	pre_op_attr  before;
503*0Sstevel@tonic-gate 	post_op_attr after;
504*0Sstevel@tonic-gate };
505*0Sstevel@tonic-gate 
506*0Sstevel@tonic-gate union post_op_fh3 switch (bool handle_follows) {
507*0Sstevel@tonic-gate case TRUE:
508*0Sstevel@tonic-gate 	nfs_fh3 handle;
509*0Sstevel@tonic-gate case FALSE:
510*0Sstevel@tonic-gate 	void;
511*0Sstevel@tonic-gate };
512*0Sstevel@tonic-gate 
513*0Sstevel@tonic-gate enum time_how {
514*0Sstevel@tonic-gate 	DONT_CHANGE	   = 0,
515*0Sstevel@tonic-gate 	SET_TO_SERVER_TIME = 1,
516*0Sstevel@tonic-gate 	SET_TO_CLIENT_TIME = 2
517*0Sstevel@tonic-gate };
518*0Sstevel@tonic-gate 
519*0Sstevel@tonic-gate union set_mode3 switch (bool set_it) {
520*0Sstevel@tonic-gate case TRUE:
521*0Sstevel@tonic-gate 	mode3 mode;
522*0Sstevel@tonic-gate default:
523*0Sstevel@tonic-gate 	void;
524*0Sstevel@tonic-gate };
525*0Sstevel@tonic-gate 
526*0Sstevel@tonic-gate union set_uid3 switch (bool set_it) {
527*0Sstevel@tonic-gate case TRUE:
528*0Sstevel@tonic-gate 	uid3 uid;
529*0Sstevel@tonic-gate default:
530*0Sstevel@tonic-gate 	void;
531*0Sstevel@tonic-gate };
532*0Sstevel@tonic-gate 
533*0Sstevel@tonic-gate union set_gid3 switch (bool set_it) {
534*0Sstevel@tonic-gate case TRUE:
535*0Sstevel@tonic-gate 	gid3 gid;
536*0Sstevel@tonic-gate default:
537*0Sstevel@tonic-gate 	void;
538*0Sstevel@tonic-gate };
539*0Sstevel@tonic-gate 
540*0Sstevel@tonic-gate union set_size3 switch (bool set_it) {
541*0Sstevel@tonic-gate case TRUE:
542*0Sstevel@tonic-gate 	size3	size;
543*0Sstevel@tonic-gate default:
544*0Sstevel@tonic-gate 	void;
545*0Sstevel@tonic-gate };
546*0Sstevel@tonic-gate 
547*0Sstevel@tonic-gate union set_atime switch (time_how set_it) {
548*0Sstevel@tonic-gate case SET_TO_CLIENT_TIME:
549*0Sstevel@tonic-gate 	nfstime3 atime;
550*0Sstevel@tonic-gate default:
551*0Sstevel@tonic-gate 	void;
552*0Sstevel@tonic-gate };
553*0Sstevel@tonic-gate 
554*0Sstevel@tonic-gate union set_mtime switch (time_how set_it) {
555*0Sstevel@tonic-gate case SET_TO_CLIENT_TIME:
556*0Sstevel@tonic-gate 	nfstime3 mtime;
557*0Sstevel@tonic-gate default:
558*0Sstevel@tonic-gate 	void;
559*0Sstevel@tonic-gate };
560*0Sstevel@tonic-gate 
561*0Sstevel@tonic-gate struct sattr3 {
562*0Sstevel@tonic-gate 	set_mode3 mode;
563*0Sstevel@tonic-gate 	set_uid3  uid;
564*0Sstevel@tonic-gate 	set_gid3  gid;
565*0Sstevel@tonic-gate 	set_size3 size;
566*0Sstevel@tonic-gate 	set_atime atime;
567*0Sstevel@tonic-gate 	set_mtime mtime;
568*0Sstevel@tonic-gate };
569*0Sstevel@tonic-gate 
570*0Sstevel@tonic-gate struct diropargs3 {
571*0Sstevel@tonic-gate 	nfs_fh3   dir;
572*0Sstevel@tonic-gate 	filename3 name;
573*0Sstevel@tonic-gate };
574*0Sstevel@tonic-gate 
575*0Sstevel@tonic-gate /*
576*0Sstevel@tonic-gate  * GETATTR: Get file attributes
577*0Sstevel@tonic-gate  */
578*0Sstevel@tonic-gate struct GETATTR3args {
579*0Sstevel@tonic-gate 	nfs_fh3 object;
580*0Sstevel@tonic-gate };
581*0Sstevel@tonic-gate 
582*0Sstevel@tonic-gate struct GETATTR3resok {
583*0Sstevel@tonic-gate 	fattr3 obj_attributes;
584*0Sstevel@tonic-gate };
585*0Sstevel@tonic-gate 
586*0Sstevel@tonic-gate union GETATTR3res switch (nfsstat3 status) {
587*0Sstevel@tonic-gate case NFS3_OK:
588*0Sstevel@tonic-gate 	GETATTR3resok resok;
589*0Sstevel@tonic-gate default:
590*0Sstevel@tonic-gate 	void;
591*0Sstevel@tonic-gate };
592*0Sstevel@tonic-gate 
593*0Sstevel@tonic-gate /*
594*0Sstevel@tonic-gate  * SETATTR: Set file attributes
595*0Sstevel@tonic-gate  */
596*0Sstevel@tonic-gate union sattrguard3 switch (bool check) {
597*0Sstevel@tonic-gate case TRUE:
598*0Sstevel@tonic-gate 	nfstime3 obj_ctime;
599*0Sstevel@tonic-gate case FALSE:
600*0Sstevel@tonic-gate 	void;
601*0Sstevel@tonic-gate };
602*0Sstevel@tonic-gate 
603*0Sstevel@tonic-gate struct SETATTR3args {
604*0Sstevel@tonic-gate 	nfs_fh3     object;
605*0Sstevel@tonic-gate 	sattr3	    new_attributes;
606*0Sstevel@tonic-gate 	sattrguard3 guard;
607*0Sstevel@tonic-gate };
608*0Sstevel@tonic-gate 
609*0Sstevel@tonic-gate struct SETATTR3resok {
610*0Sstevel@tonic-gate 	wcc_data obj_wcc;
611*0Sstevel@tonic-gate };
612*0Sstevel@tonic-gate 
613*0Sstevel@tonic-gate struct SETATTR3resfail {
614*0Sstevel@tonic-gate 	wcc_data obj_wcc;
615*0Sstevel@tonic-gate };
616*0Sstevel@tonic-gate 
617*0Sstevel@tonic-gate union SETATTR3res switch (nfsstat3 status) {
618*0Sstevel@tonic-gate case NFS3_OK:
619*0Sstevel@tonic-gate 	SETATTR3resok	resok;
620*0Sstevel@tonic-gate default:
621*0Sstevel@tonic-gate 	SETATTR3resfail	resfail;
622*0Sstevel@tonic-gate };
623*0Sstevel@tonic-gate 
624*0Sstevel@tonic-gate /*
625*0Sstevel@tonic-gate  * LOOKUP: Lookup filename
626*0Sstevel@tonic-gate  */
627*0Sstevel@tonic-gate struct LOOKUP3args {
628*0Sstevel@tonic-gate 	diropargs3 what;
629*0Sstevel@tonic-gate };
630*0Sstevel@tonic-gate 
631*0Sstevel@tonic-gate struct LOOKUP3resok {
632*0Sstevel@tonic-gate 	nfs_fh3		object;
633*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
634*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
635*0Sstevel@tonic-gate };
636*0Sstevel@tonic-gate 
637*0Sstevel@tonic-gate struct LOOKUP3resfail {
638*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
639*0Sstevel@tonic-gate };
640*0Sstevel@tonic-gate 
641*0Sstevel@tonic-gate union LOOKUP3res switch (nfsstat3 status) {
642*0Sstevel@tonic-gate case NFS3_OK:
643*0Sstevel@tonic-gate 	LOOKUP3resok	resok;
644*0Sstevel@tonic-gate default:
645*0Sstevel@tonic-gate 	LOOKUP3resfail	resfail;
646*0Sstevel@tonic-gate };
647*0Sstevel@tonic-gate 
648*0Sstevel@tonic-gate /*
649*0Sstevel@tonic-gate  * ACCESS: Check access permission
650*0Sstevel@tonic-gate  */
651*0Sstevel@tonic-gate const ACCESS3_READ	= 0x0001;
652*0Sstevel@tonic-gate const ACCESS3_LOOKUP	= 0x0002;
653*0Sstevel@tonic-gate const ACCESS3_MODIFY	= 0x0004;
654*0Sstevel@tonic-gate const ACCESS3_EXTEND	= 0x0008;
655*0Sstevel@tonic-gate const ACCESS3_DELETE	= 0x0010;
656*0Sstevel@tonic-gate const ACCESS3_EXECUTE	= 0x0020;
657*0Sstevel@tonic-gate 
658*0Sstevel@tonic-gate struct ACCESS3args {
659*0Sstevel@tonic-gate 	nfs_fh3	object;
660*0Sstevel@tonic-gate 	uint32	access;
661*0Sstevel@tonic-gate };
662*0Sstevel@tonic-gate 
663*0Sstevel@tonic-gate struct ACCESS3resok {
664*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
665*0Sstevel@tonic-gate 	uint32		access;
666*0Sstevel@tonic-gate };
667*0Sstevel@tonic-gate 
668*0Sstevel@tonic-gate struct ACCESS3resfail {
669*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
670*0Sstevel@tonic-gate };
671*0Sstevel@tonic-gate 
672*0Sstevel@tonic-gate union ACCESS3res switch (nfsstat3 status) {
673*0Sstevel@tonic-gate case NFS3_OK:
674*0Sstevel@tonic-gate 	ACCESS3resok	resok;
675*0Sstevel@tonic-gate default:
676*0Sstevel@tonic-gate 	ACCESS3resfail	resfail;
677*0Sstevel@tonic-gate };
678*0Sstevel@tonic-gate 
679*0Sstevel@tonic-gate /*
680*0Sstevel@tonic-gate  * READLINK: Read from symbolic link
681*0Sstevel@tonic-gate  */
682*0Sstevel@tonic-gate struct READLINK3args {
683*0Sstevel@tonic-gate 	nfs_fh3	symlink;
684*0Sstevel@tonic-gate };
685*0Sstevel@tonic-gate 
686*0Sstevel@tonic-gate struct READLINK3resok {
687*0Sstevel@tonic-gate 	post_op_attr	symlink_attributes;
688*0Sstevel@tonic-gate 	nfspath3	data;
689*0Sstevel@tonic-gate };
690*0Sstevel@tonic-gate 
691*0Sstevel@tonic-gate struct READLINK3resfail {
692*0Sstevel@tonic-gate 	post_op_attr	symlink_attributes;
693*0Sstevel@tonic-gate };
694*0Sstevel@tonic-gate 
695*0Sstevel@tonic-gate union READLINK3res switch (nfsstat3 status) {
696*0Sstevel@tonic-gate case NFS3_OK:
697*0Sstevel@tonic-gate 	READLINK3resok	 resok;
698*0Sstevel@tonic-gate default:
699*0Sstevel@tonic-gate 	READLINK3resfail resfail;
700*0Sstevel@tonic-gate };
701*0Sstevel@tonic-gate 
702*0Sstevel@tonic-gate /*
703*0Sstevel@tonic-gate  * READ: Read from file
704*0Sstevel@tonic-gate  */
705*0Sstevel@tonic-gate struct READ3args {
706*0Sstevel@tonic-gate 	nfs_fh3		file;
707*0Sstevel@tonic-gate 	offset3		offset;
708*0Sstevel@tonic-gate 	count3		count;
709*0Sstevel@tonic-gate };
710*0Sstevel@tonic-gate 
711*0Sstevel@tonic-gate struct READ3resok {
712*0Sstevel@tonic-gate 	post_op_attr	file_attributes;
713*0Sstevel@tonic-gate 	count3		count;
714*0Sstevel@tonic-gate 	bool		eof;
715*0Sstevel@tonic-gate 	opaque		data<>;
716*0Sstevel@tonic-gate };
717*0Sstevel@tonic-gate 
718*0Sstevel@tonic-gate struct READ3resfail {
719*0Sstevel@tonic-gate 	post_op_attr	file_attributes;
720*0Sstevel@tonic-gate };
721*0Sstevel@tonic-gate 
722*0Sstevel@tonic-gate union READ3res switch (nfsstat3 status) {
723*0Sstevel@tonic-gate case NFS3_OK:
724*0Sstevel@tonic-gate 	READ3resok	resok;
725*0Sstevel@tonic-gate default:
726*0Sstevel@tonic-gate 	READ3resfail	resfail;
727*0Sstevel@tonic-gate };
728*0Sstevel@tonic-gate 
729*0Sstevel@tonic-gate /*
730*0Sstevel@tonic-gate  * WRITE: Write to file
731*0Sstevel@tonic-gate  */
732*0Sstevel@tonic-gate enum stable_how {
733*0Sstevel@tonic-gate 	UNSTABLE  = 0,
734*0Sstevel@tonic-gate 	DATA_SYNC = 1,
735*0Sstevel@tonic-gate 	FILE_SYNC = 2
736*0Sstevel@tonic-gate };
737*0Sstevel@tonic-gate 
738*0Sstevel@tonic-gate struct WRITE3args {
739*0Sstevel@tonic-gate 	nfs_fh3		file;
740*0Sstevel@tonic-gate 	offset3		offset;
741*0Sstevel@tonic-gate 	count3		count;
742*0Sstevel@tonic-gate 	stable_how	stable;
743*0Sstevel@tonic-gate 	opaque		data<>;
744*0Sstevel@tonic-gate };
745*0Sstevel@tonic-gate 
746*0Sstevel@tonic-gate struct WRITE3resok {
747*0Sstevel@tonic-gate 	wcc_data	file_wcc;
748*0Sstevel@tonic-gate 	count3		count;
749*0Sstevel@tonic-gate 	stable_how	committed;
750*0Sstevel@tonic-gate 	writeverf3	verf;
751*0Sstevel@tonic-gate };
752*0Sstevel@tonic-gate 
753*0Sstevel@tonic-gate struct WRITE3resfail {
754*0Sstevel@tonic-gate 	wcc_data	file_wcc;
755*0Sstevel@tonic-gate };
756*0Sstevel@tonic-gate 
757*0Sstevel@tonic-gate union WRITE3res switch (nfsstat3 status) {
758*0Sstevel@tonic-gate case NFS3_OK:
759*0Sstevel@tonic-gate 	WRITE3resok	resok;
760*0Sstevel@tonic-gate default:
761*0Sstevel@tonic-gate 	WRITE3resfail	resfail;
762*0Sstevel@tonic-gate };
763*0Sstevel@tonic-gate 
764*0Sstevel@tonic-gate /*
765*0Sstevel@tonic-gate  * CREATE: Create a file
766*0Sstevel@tonic-gate  */
767*0Sstevel@tonic-gate enum createmode3 {
768*0Sstevel@tonic-gate 	UNCHECKED = 0,
769*0Sstevel@tonic-gate 	GUARDED	  = 1,
770*0Sstevel@tonic-gate 	EXCLUSIVE = 2
771*0Sstevel@tonic-gate };
772*0Sstevel@tonic-gate 
773*0Sstevel@tonic-gate union createhow3 switch (createmode3 mode) {
774*0Sstevel@tonic-gate case UNCHECKED:
775*0Sstevel@tonic-gate case GUARDED:
776*0Sstevel@tonic-gate 	sattr3		obj_attributes;
777*0Sstevel@tonic-gate case EXCLUSIVE:
778*0Sstevel@tonic-gate 	createverf3	verf;
779*0Sstevel@tonic-gate };
780*0Sstevel@tonic-gate 
781*0Sstevel@tonic-gate struct CREATE3args {
782*0Sstevel@tonic-gate 	diropargs3	where;
783*0Sstevel@tonic-gate 	createhow3	how;
784*0Sstevel@tonic-gate };
785*0Sstevel@tonic-gate 
786*0Sstevel@tonic-gate struct CREATE3resok {
787*0Sstevel@tonic-gate 	post_op_fh3	obj;
788*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
789*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
790*0Sstevel@tonic-gate };
791*0Sstevel@tonic-gate 
792*0Sstevel@tonic-gate struct CREATE3resfail {
793*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
794*0Sstevel@tonic-gate };
795*0Sstevel@tonic-gate 
796*0Sstevel@tonic-gate union CREATE3res switch (nfsstat3 status) {
797*0Sstevel@tonic-gate case NFS3_OK:
798*0Sstevel@tonic-gate 	CREATE3resok	resok;
799*0Sstevel@tonic-gate default:
800*0Sstevel@tonic-gate 	CREATE3resfail	resfail;
801*0Sstevel@tonic-gate };
802*0Sstevel@tonic-gate 
803*0Sstevel@tonic-gate /*
804*0Sstevel@tonic-gate  * MKDIR: Create a directory
805*0Sstevel@tonic-gate  */
806*0Sstevel@tonic-gate struct MKDIR3args {
807*0Sstevel@tonic-gate 	diropargs3	where;
808*0Sstevel@tonic-gate 	sattr3		attributes;
809*0Sstevel@tonic-gate };
810*0Sstevel@tonic-gate 
811*0Sstevel@tonic-gate struct MKDIR3resok {
812*0Sstevel@tonic-gate 	post_op_fh3	obj;
813*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
814*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
815*0Sstevel@tonic-gate };
816*0Sstevel@tonic-gate 
817*0Sstevel@tonic-gate struct MKDIR3resfail {
818*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
819*0Sstevel@tonic-gate };
820*0Sstevel@tonic-gate 
821*0Sstevel@tonic-gate union MKDIR3res switch (nfsstat3 status) {
822*0Sstevel@tonic-gate case NFS3_OK:
823*0Sstevel@tonic-gate 	MKDIR3resok	resok;
824*0Sstevel@tonic-gate default:
825*0Sstevel@tonic-gate 	MKDIR3resfail	resfail;
826*0Sstevel@tonic-gate };
827*0Sstevel@tonic-gate 
828*0Sstevel@tonic-gate /*
829*0Sstevel@tonic-gate  * SYMLINK: Create a symbolic link
830*0Sstevel@tonic-gate  */
831*0Sstevel@tonic-gate struct symlinkdata3 {
832*0Sstevel@tonic-gate 	sattr3		symlink_attributes;
833*0Sstevel@tonic-gate 	nfspath3	symlink_data;
834*0Sstevel@tonic-gate };
835*0Sstevel@tonic-gate 
836*0Sstevel@tonic-gate struct SYMLINK3args {
837*0Sstevel@tonic-gate 	diropargs3	where;
838*0Sstevel@tonic-gate 	symlinkdata3	symlink;
839*0Sstevel@tonic-gate };
840*0Sstevel@tonic-gate 
841*0Sstevel@tonic-gate struct SYMLINK3resok {
842*0Sstevel@tonic-gate 	post_op_fh3	obj;
843*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
844*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
845*0Sstevel@tonic-gate };
846*0Sstevel@tonic-gate 
847*0Sstevel@tonic-gate struct SYMLINK3resfail {
848*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
849*0Sstevel@tonic-gate };
850*0Sstevel@tonic-gate 
851*0Sstevel@tonic-gate union SYMLINK3res switch (nfsstat3 status) {
852*0Sstevel@tonic-gate case NFS3_OK:
853*0Sstevel@tonic-gate 	SYMLINK3resok	resok;
854*0Sstevel@tonic-gate default:
855*0Sstevel@tonic-gate 	SYMLINK3resfail	resfail;
856*0Sstevel@tonic-gate };
857*0Sstevel@tonic-gate 
858*0Sstevel@tonic-gate /*
859*0Sstevel@tonic-gate  * MKNOD: Create a special file
860*0Sstevel@tonic-gate  */
861*0Sstevel@tonic-gate struct devicedata3 {
862*0Sstevel@tonic-gate 	sattr3		dev_attributes;
863*0Sstevel@tonic-gate 	specdata3	spec;
864*0Sstevel@tonic-gate };
865*0Sstevel@tonic-gate 
866*0Sstevel@tonic-gate union mknoddata3 switch (ftype3 type) {
867*0Sstevel@tonic-gate case NF3CHR:
868*0Sstevel@tonic-gate case NF3BLK:
869*0Sstevel@tonic-gate 	devicedata3	device;
870*0Sstevel@tonic-gate case NF3SOCK:
871*0Sstevel@tonic-gate case NF3FIFO:
872*0Sstevel@tonic-gate 	sattr3		pipe_attributes;
873*0Sstevel@tonic-gate default:
874*0Sstevel@tonic-gate 	void;
875*0Sstevel@tonic-gate };
876*0Sstevel@tonic-gate 
877*0Sstevel@tonic-gate struct MKNOD3args {
878*0Sstevel@tonic-gate 	diropargs3	where;
879*0Sstevel@tonic-gate 	mknoddata3	what;
880*0Sstevel@tonic-gate };
881*0Sstevel@tonic-gate 
882*0Sstevel@tonic-gate struct MKNOD3resok {
883*0Sstevel@tonic-gate 	post_op_fh3	obj;
884*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
885*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
886*0Sstevel@tonic-gate };
887*0Sstevel@tonic-gate 
888*0Sstevel@tonic-gate struct MKNOD3resfail {
889*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
890*0Sstevel@tonic-gate };
891*0Sstevel@tonic-gate 
892*0Sstevel@tonic-gate union MKNOD3res switch (nfsstat3 status) {
893*0Sstevel@tonic-gate case NFS3_OK:
894*0Sstevel@tonic-gate 	MKNOD3resok	resok;
895*0Sstevel@tonic-gate default:
896*0Sstevel@tonic-gate 	MKNOD3resfail	resfail;
897*0Sstevel@tonic-gate };
898*0Sstevel@tonic-gate 
899*0Sstevel@tonic-gate /*
900*0Sstevel@tonic-gate  * REMOVE: Remove a file
901*0Sstevel@tonic-gate  */
902*0Sstevel@tonic-gate struct REMOVE3args {
903*0Sstevel@tonic-gate 	diropargs3	object;
904*0Sstevel@tonic-gate };
905*0Sstevel@tonic-gate 
906*0Sstevel@tonic-gate struct REMOVE3resok {
907*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
908*0Sstevel@tonic-gate };
909*0Sstevel@tonic-gate 
910*0Sstevel@tonic-gate struct REMOVE3resfail {
911*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
912*0Sstevel@tonic-gate };
913*0Sstevel@tonic-gate 
914*0Sstevel@tonic-gate union REMOVE3res switch (nfsstat3 status) {
915*0Sstevel@tonic-gate case NFS3_OK:
916*0Sstevel@tonic-gate 	REMOVE3resok	resok;
917*0Sstevel@tonic-gate default:
918*0Sstevel@tonic-gate 	REMOVE3resfail	resfail;
919*0Sstevel@tonic-gate };
920*0Sstevel@tonic-gate 
921*0Sstevel@tonic-gate /*
922*0Sstevel@tonic-gate  * RMDIR: Remove a directory
923*0Sstevel@tonic-gate  */
924*0Sstevel@tonic-gate struct RMDIR3args {
925*0Sstevel@tonic-gate 	diropargs3 object;
926*0Sstevel@tonic-gate };
927*0Sstevel@tonic-gate 
928*0Sstevel@tonic-gate struct RMDIR3resok {
929*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
930*0Sstevel@tonic-gate };
931*0Sstevel@tonic-gate 
932*0Sstevel@tonic-gate struct RMDIR3resfail {
933*0Sstevel@tonic-gate 	wcc_data	dir_wcc;
934*0Sstevel@tonic-gate };
935*0Sstevel@tonic-gate 
936*0Sstevel@tonic-gate union RMDIR3res switch (nfsstat3 status) {
937*0Sstevel@tonic-gate case NFS3_OK:
938*0Sstevel@tonic-gate 	RMDIR3resok	resok;
939*0Sstevel@tonic-gate default:
940*0Sstevel@tonic-gate 	RMDIR3resfail	resfail;
941*0Sstevel@tonic-gate };
942*0Sstevel@tonic-gate 
943*0Sstevel@tonic-gate /*
944*0Sstevel@tonic-gate  * RENAME: Rename a file or directory
945*0Sstevel@tonic-gate  */
946*0Sstevel@tonic-gate struct RENAME3args {
947*0Sstevel@tonic-gate 	diropargs3	from;
948*0Sstevel@tonic-gate 	diropargs3	to;
949*0Sstevel@tonic-gate };
950*0Sstevel@tonic-gate 
951*0Sstevel@tonic-gate struct RENAME3resok {
952*0Sstevel@tonic-gate 	wcc_data	fromdir_wcc;
953*0Sstevel@tonic-gate 	wcc_data	todir_wcc;
954*0Sstevel@tonic-gate };
955*0Sstevel@tonic-gate 
956*0Sstevel@tonic-gate struct RENAME3resfail {
957*0Sstevel@tonic-gate 	wcc_data	fromdir_wcc;
958*0Sstevel@tonic-gate 	wcc_data	todir_wcc;
959*0Sstevel@tonic-gate };
960*0Sstevel@tonic-gate 
961*0Sstevel@tonic-gate union RENAME3res switch (nfsstat3 status) {
962*0Sstevel@tonic-gate case NFS3_OK:
963*0Sstevel@tonic-gate 	RENAME3resok	resok;
964*0Sstevel@tonic-gate default:
965*0Sstevel@tonic-gate 	RENAME3resfail	resfail;
966*0Sstevel@tonic-gate };
967*0Sstevel@tonic-gate 
968*0Sstevel@tonic-gate /*
969*0Sstevel@tonic-gate  * LINK: Create link to an object
970*0Sstevel@tonic-gate  */
971*0Sstevel@tonic-gate struct LINK3args {
972*0Sstevel@tonic-gate 	nfs_fh3		file;
973*0Sstevel@tonic-gate 	diropargs3	link;
974*0Sstevel@tonic-gate };
975*0Sstevel@tonic-gate 
976*0Sstevel@tonic-gate struct LINK3resok {
977*0Sstevel@tonic-gate 	post_op_attr	file_attributes;
978*0Sstevel@tonic-gate 	wcc_data	linkdir_wcc;
979*0Sstevel@tonic-gate };
980*0Sstevel@tonic-gate 
981*0Sstevel@tonic-gate struct LINK3resfail {
982*0Sstevel@tonic-gate 	post_op_attr	file_attributes;
983*0Sstevel@tonic-gate 	wcc_data	linkdir_wcc;
984*0Sstevel@tonic-gate };
985*0Sstevel@tonic-gate 
986*0Sstevel@tonic-gate union LINK3res switch (nfsstat3 status) {
987*0Sstevel@tonic-gate case NFS3_OK:
988*0Sstevel@tonic-gate 	LINK3resok	resok;
989*0Sstevel@tonic-gate default:
990*0Sstevel@tonic-gate 	LINK3resfail	resfail;
991*0Sstevel@tonic-gate };
992*0Sstevel@tonic-gate 
993*0Sstevel@tonic-gate /*
994*0Sstevel@tonic-gate  * READDIR: Read from directory
995*0Sstevel@tonic-gate  */
996*0Sstevel@tonic-gate struct READDIR3args {
997*0Sstevel@tonic-gate 	nfs_fh3		dir;
998*0Sstevel@tonic-gate 	cookie3		cookie;
999*0Sstevel@tonic-gate 	cookieverf3	cookieverf;
1000*0Sstevel@tonic-gate 	count3		count;
1001*0Sstevel@tonic-gate };
1002*0Sstevel@tonic-gate 
1003*0Sstevel@tonic-gate struct entry3 {
1004*0Sstevel@tonic-gate 	fileid3		fileid;
1005*0Sstevel@tonic-gate 	filename3	name;
1006*0Sstevel@tonic-gate 	cookie3		cookie;
1007*0Sstevel@tonic-gate 	entry3		*nextentry;
1008*0Sstevel@tonic-gate };
1009*0Sstevel@tonic-gate 
1010*0Sstevel@tonic-gate struct dirlist3 {
1011*0Sstevel@tonic-gate 	entry3	*entries;
1012*0Sstevel@tonic-gate 	bool	eof;
1013*0Sstevel@tonic-gate };
1014*0Sstevel@tonic-gate 
1015*0Sstevel@tonic-gate struct READDIR3resok {
1016*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
1017*0Sstevel@tonic-gate 	cookieverf3	cookieverf;
1018*0Sstevel@tonic-gate 	dirlist3	reply;
1019*0Sstevel@tonic-gate };
1020*0Sstevel@tonic-gate 
1021*0Sstevel@tonic-gate struct READDIR3resfail {
1022*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
1023*0Sstevel@tonic-gate };
1024*0Sstevel@tonic-gate 
1025*0Sstevel@tonic-gate union READDIR3res switch (nfsstat3 status) {
1026*0Sstevel@tonic-gate case NFS3_OK:
1027*0Sstevel@tonic-gate 	READDIR3resok	resok;
1028*0Sstevel@tonic-gate default:
1029*0Sstevel@tonic-gate 	READDIR3resfail	resfail;
1030*0Sstevel@tonic-gate };
1031*0Sstevel@tonic-gate 
1032*0Sstevel@tonic-gate /*
1033*0Sstevel@tonic-gate  * READDIRPLUS: Extended read from a directory
1034*0Sstevel@tonic-gate  */
1035*0Sstevel@tonic-gate struct READDIRPLUS3args {
1036*0Sstevel@tonic-gate 	nfs_fh3		dir;
1037*0Sstevel@tonic-gate 	cookie3		cookie;
1038*0Sstevel@tonic-gate 	cookieverf3	cookieverf;
1039*0Sstevel@tonic-gate 	count3		dircount;
1040*0Sstevel@tonic-gate 	count3		maxcount;
1041*0Sstevel@tonic-gate };
1042*0Sstevel@tonic-gate 
1043*0Sstevel@tonic-gate struct entryplus3 {
1044*0Sstevel@tonic-gate 	fileid3		fileid;
1045*0Sstevel@tonic-gate 	filename3	name;
1046*0Sstevel@tonic-gate 	cookie3		cookie;
1047*0Sstevel@tonic-gate 	post_op_attr	name_attributes;
1048*0Sstevel@tonic-gate 	post_op_fh3	name_handle;
1049*0Sstevel@tonic-gate 	entryplus3	*nextentry;
1050*0Sstevel@tonic-gate };
1051*0Sstevel@tonic-gate 
1052*0Sstevel@tonic-gate struct dirlistplus3 {
1053*0Sstevel@tonic-gate 	entryplus3	*entries;
1054*0Sstevel@tonic-gate 	bool		eof;
1055*0Sstevel@tonic-gate };
1056*0Sstevel@tonic-gate 
1057*0Sstevel@tonic-gate struct READDIRPLUS3resok {
1058*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
1059*0Sstevel@tonic-gate 	cookieverf3	cookieverf;
1060*0Sstevel@tonic-gate 	dirlistplus3	reply;
1061*0Sstevel@tonic-gate };
1062*0Sstevel@tonic-gate 
1063*0Sstevel@tonic-gate struct READDIRPLUS3resfail {
1064*0Sstevel@tonic-gate 	post_op_attr	dir_attributes;
1065*0Sstevel@tonic-gate };
1066*0Sstevel@tonic-gate 
1067*0Sstevel@tonic-gate union READDIRPLUS3res switch (nfsstat3 status) {
1068*0Sstevel@tonic-gate case NFS3_OK:
1069*0Sstevel@tonic-gate 	READDIRPLUS3resok	resok;
1070*0Sstevel@tonic-gate default:
1071*0Sstevel@tonic-gate 	READDIRPLUS3resfail	resfail;
1072*0Sstevel@tonic-gate };
1073*0Sstevel@tonic-gate 
1074*0Sstevel@tonic-gate /*
1075*0Sstevel@tonic-gate  * FSSTAT: Get dynamic file system information
1076*0Sstevel@tonic-gate  */
1077*0Sstevel@tonic-gate struct FSSTAT3args {
1078*0Sstevel@tonic-gate 	nfs_fh3	fsroot;
1079*0Sstevel@tonic-gate };
1080*0Sstevel@tonic-gate 
1081*0Sstevel@tonic-gate struct FSSTAT3resok {
1082*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1083*0Sstevel@tonic-gate 	size3		tbytes;
1084*0Sstevel@tonic-gate 	size3		fbytes;
1085*0Sstevel@tonic-gate 	size3		abytes;
1086*0Sstevel@tonic-gate 	size3		tfiles;
1087*0Sstevel@tonic-gate 	size3		ffiles;
1088*0Sstevel@tonic-gate 	size3		afiles;
1089*0Sstevel@tonic-gate 	uint32		invarsec;
1090*0Sstevel@tonic-gate };
1091*0Sstevel@tonic-gate 
1092*0Sstevel@tonic-gate struct FSSTAT3resfail {
1093*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1094*0Sstevel@tonic-gate };
1095*0Sstevel@tonic-gate 
1096*0Sstevel@tonic-gate union FSSTAT3res switch (nfsstat3 status) {
1097*0Sstevel@tonic-gate case NFS3_OK:
1098*0Sstevel@tonic-gate 	FSSTAT3resok	resok;
1099*0Sstevel@tonic-gate default:
1100*0Sstevel@tonic-gate 	FSSTAT3resfail	resfail;
1101*0Sstevel@tonic-gate };
1102*0Sstevel@tonic-gate 
1103*0Sstevel@tonic-gate /*
1104*0Sstevel@tonic-gate  * FSINFO: Get static file system information
1105*0Sstevel@tonic-gate  */
1106*0Sstevel@tonic-gate 
1107*0Sstevel@tonic-gate const FSF3_LINK		= 0x0001;
1108*0Sstevel@tonic-gate const FSF3_SYMLINK	= 0x0002;
1109*0Sstevel@tonic-gate const FSF3_HOMOGENEOUS	= 0x0008;
1110*0Sstevel@tonic-gate const FSF3_CANSETTIME	= 0x0010;
1111*0Sstevel@tonic-gate 
1112*0Sstevel@tonic-gate struct FSINFO3args {
1113*0Sstevel@tonic-gate 	nfs_fh3	fsroot;
1114*0Sstevel@tonic-gate };
1115*0Sstevel@tonic-gate 
1116*0Sstevel@tonic-gate struct FSINFO3resok {
1117*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1118*0Sstevel@tonic-gate 	uint32		rtmax;
1119*0Sstevel@tonic-gate 	uint32		rtpref;
1120*0Sstevel@tonic-gate 	uint32		rtmult;
1121*0Sstevel@tonic-gate 	uint32		wtmax;
1122*0Sstevel@tonic-gate 	uint32		wtpref;
1123*0Sstevel@tonic-gate 	uint32		wtmult;
1124*0Sstevel@tonic-gate 	uint32		dtpref;
1125*0Sstevel@tonic-gate 	size3		maxfilesize;
1126*0Sstevel@tonic-gate 	nfstime3	time_delta;
1127*0Sstevel@tonic-gate 	uint32		properties;
1128*0Sstevel@tonic-gate };
1129*0Sstevel@tonic-gate 
1130*0Sstevel@tonic-gate struct FSINFO3resfail {
1131*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1132*0Sstevel@tonic-gate };
1133*0Sstevel@tonic-gate 
1134*0Sstevel@tonic-gate union FSINFO3res switch (nfsstat3 status) {
1135*0Sstevel@tonic-gate case NFS3_OK:
1136*0Sstevel@tonic-gate 	FSINFO3resok	resok;
1137*0Sstevel@tonic-gate default:
1138*0Sstevel@tonic-gate 	FSINFO3resfail	resfail;
1139*0Sstevel@tonic-gate };
1140*0Sstevel@tonic-gate 
1141*0Sstevel@tonic-gate /*
1142*0Sstevel@tonic-gate  * PATHCONF: Retrieve POSIX information
1143*0Sstevel@tonic-gate  */
1144*0Sstevel@tonic-gate struct PATHCONF3args {
1145*0Sstevel@tonic-gate 	nfs_fh3	object;
1146*0Sstevel@tonic-gate };
1147*0Sstevel@tonic-gate 
1148*0Sstevel@tonic-gate struct PATHCONF3resok {
1149*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1150*0Sstevel@tonic-gate 	uint32		linkmax;
1151*0Sstevel@tonic-gate 	uint32		name_max;
1152*0Sstevel@tonic-gate 	bool		no_trunc;
1153*0Sstevel@tonic-gate 	bool		chown_restricted;
1154*0Sstevel@tonic-gate 	bool		case_insensitive;
1155*0Sstevel@tonic-gate 	bool		case_preserving;
1156*0Sstevel@tonic-gate };
1157*0Sstevel@tonic-gate 
1158*0Sstevel@tonic-gate struct PATHCONF3resfail {
1159*0Sstevel@tonic-gate 	post_op_attr	obj_attributes;
1160*0Sstevel@tonic-gate };
1161*0Sstevel@tonic-gate 
1162*0Sstevel@tonic-gate union PATHCONF3res switch (nfsstat3 status) {
1163*0Sstevel@tonic-gate case NFS3_OK:
1164*0Sstevel@tonic-gate 	PATHCONF3resok	 resok;
1165*0Sstevel@tonic-gate default:
1166*0Sstevel@tonic-gate 	PATHCONF3resfail resfail;
1167*0Sstevel@tonic-gate };
1168*0Sstevel@tonic-gate 
1169*0Sstevel@tonic-gate /*
1170*0Sstevel@tonic-gate  * COMMIT: Commit cached data on a server to stable storage
1171*0Sstevel@tonic-gate  */
1172*0Sstevel@tonic-gate struct COMMIT3args {
1173*0Sstevel@tonic-gate 	nfs_fh3	file;
1174*0Sstevel@tonic-gate 	offset3	offset;
1175*0Sstevel@tonic-gate 	count3	count;
1176*0Sstevel@tonic-gate };
1177*0Sstevel@tonic-gate 
1178*0Sstevel@tonic-gate struct COMMIT3resok {
1179*0Sstevel@tonic-gate 	wcc_data	file_wcc;
1180*0Sstevel@tonic-gate 	writeverf3	verf;
1181*0Sstevel@tonic-gate };
1182*0Sstevel@tonic-gate 
1183*0Sstevel@tonic-gate struct COMMIT3resfail {
1184*0Sstevel@tonic-gate 	wcc_data	file_wcc;
1185*0Sstevel@tonic-gate };
1186*0Sstevel@tonic-gate 
1187*0Sstevel@tonic-gate union COMMIT3res switch (nfsstat3 status) {
1188*0Sstevel@tonic-gate case NFS3_OK:
1189*0Sstevel@tonic-gate 	COMMIT3resok	resok;
1190*0Sstevel@tonic-gate default:
1191*0Sstevel@tonic-gate 	COMMIT3resfail	resfail;
1192*0Sstevel@tonic-gate };
1193*0Sstevel@tonic-gate 
1194*0Sstevel@tonic-gate /*
1195*0Sstevel@tonic-gate  * Remote file service routines
1196*0Sstevel@tonic-gate  */
1197*0Sstevel@tonic-gate program NFS3_PROGRAM {
1198*0Sstevel@tonic-gate 	version NFS_V3 {
1199*0Sstevel@tonic-gate 		void
1200*0Sstevel@tonic-gate 		NFSPROC3_NULL(void) = 0;
1201*0Sstevel@tonic-gate 
1202*0Sstevel@tonic-gate 		GETATTR3res
1203*0Sstevel@tonic-gate 		NFSPROC3_GETATTR(GETATTR3args) = 1;
1204*0Sstevel@tonic-gate 
1205*0Sstevel@tonic-gate 		SETATTR3res
1206*0Sstevel@tonic-gate 		NFSPROC3_SETATTR(SETATTR3args) = 2;
1207*0Sstevel@tonic-gate 
1208*0Sstevel@tonic-gate 		LOOKUP3res
1209*0Sstevel@tonic-gate 		NFSPROC3_LOOKUP(LOOKUP3args) = 3;
1210*0Sstevel@tonic-gate 
1211*0Sstevel@tonic-gate 		ACCESS3res
1212*0Sstevel@tonic-gate 		NFSPROC3_ACCESS(ACCESS3args) = 4;
1213*0Sstevel@tonic-gate 
1214*0Sstevel@tonic-gate 		READLINK3res
1215*0Sstevel@tonic-gate 		NFSPROC3_READLINK(READLINK3args) = 5;
1216*0Sstevel@tonic-gate 
1217*0Sstevel@tonic-gate 		READ3res
1218*0Sstevel@tonic-gate 		NFSPROC3_READ(READ3args) = 6;
1219*0Sstevel@tonic-gate 
1220*0Sstevel@tonic-gate 		WRITE3res
1221*0Sstevel@tonic-gate 		NFSPROC3_WRITE(WRITE3args) = 7;
1222*0Sstevel@tonic-gate 
1223*0Sstevel@tonic-gate 		CREATE3res
1224*0Sstevel@tonic-gate 		NFSPROC3_CREATE(CREATE3args) = 8;
1225*0Sstevel@tonic-gate 
1226*0Sstevel@tonic-gate 		MKDIR3res
1227*0Sstevel@tonic-gate 		NFSPROC3_MKDIR(MKDIR3args) = 9;
1228*0Sstevel@tonic-gate 
1229*0Sstevel@tonic-gate 		SYMLINK3res
1230*0Sstevel@tonic-gate 		NFSPROC3_SYMLINK(SYMLINK3args) = 10;
1231*0Sstevel@tonic-gate 
1232*0Sstevel@tonic-gate 		MKNOD3res
1233*0Sstevel@tonic-gate 		NFSPROC3_MKNOD(MKNOD3args) = 11;
1234*0Sstevel@tonic-gate 
1235*0Sstevel@tonic-gate 		REMOVE3res
1236*0Sstevel@tonic-gate 		NFSPROC3_REMOVE(REMOVE3args) = 12;
1237*0Sstevel@tonic-gate 
1238*0Sstevel@tonic-gate 		RMDIR3res
1239*0Sstevel@tonic-gate 		NFSPROC3_RMDIR(RMDIR3args) = 13;
1240*0Sstevel@tonic-gate 
1241*0Sstevel@tonic-gate 		RENAME3res
1242*0Sstevel@tonic-gate 		NFSPROC3_RENAME(RENAME3args) = 14;
1243*0Sstevel@tonic-gate 
1244*0Sstevel@tonic-gate 		LINK3res
1245*0Sstevel@tonic-gate 		NFSPROC3_LINK(LINK3args) = 15;
1246*0Sstevel@tonic-gate 
1247*0Sstevel@tonic-gate 		READDIR3res
1248*0Sstevel@tonic-gate 		NFSPROC3_READDIR(READDIR3args) = 16;
1249*0Sstevel@tonic-gate 
1250*0Sstevel@tonic-gate 		READDIRPLUS3res
1251*0Sstevel@tonic-gate 		NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17;
1252*0Sstevel@tonic-gate 
1253*0Sstevel@tonic-gate 		FSSTAT3res
1254*0Sstevel@tonic-gate 		NFSPROC3_FSSTAT(FSSTAT3args) = 18;
1255*0Sstevel@tonic-gate 
1256*0Sstevel@tonic-gate 		FSINFO3res
1257*0Sstevel@tonic-gate 		NFSPROC3_FSINFO(FSINFO3args) = 19;
1258*0Sstevel@tonic-gate 
1259*0Sstevel@tonic-gate 		PATHCONF3res
1260*0Sstevel@tonic-gate 		NFSPROC3_PATHCONF(PATHCONF3args) = 20;
1261*0Sstevel@tonic-gate 
1262*0Sstevel@tonic-gate 		COMMIT3res
1263*0Sstevel@tonic-gate 		NFSPROC3_COMMIT(COMMIT3args) = 21;
1264*0Sstevel@tonic-gate 	} = 3;
1265*0Sstevel@tonic-gate } = 100003;
1266