xref: /titanic_51/usr/src/head/rpcsvc/mount.x (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /* ident	"%Z%%M%	%I%	%E% SMI" */
23*7c478bd9Sstevel@tonic-gate 
24*7c478bd9Sstevel@tonic-gate /*
25*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1988,1990-1992,1998 by Sun Microsystems, Inc.
26*7c478bd9Sstevel@tonic-gate  * All rights reserved.
27*7c478bd9Sstevel@tonic-gate  */
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate /*
30*7c478bd9Sstevel@tonic-gate  * Protocol description for the mount program
31*7c478bd9Sstevel@tonic-gate  */
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate const MNTPATHLEN = 1024;	/* maximum bytes in a pathname argument */
34*7c478bd9Sstevel@tonic-gate const MNTNAMLEN = 255;		/* maximum bytes in a name argument */
35*7c478bd9Sstevel@tonic-gate const FHSIZE = 32;		/* size in bytes of a v2 file handle */
36*7c478bd9Sstevel@tonic-gate const FHSIZE3 = 64;		/*  "   "    "   "  " v3  "     "    */
37*7c478bd9Sstevel@tonic-gate 
38*7c478bd9Sstevel@tonic-gate /*
39*7c478bd9Sstevel@tonic-gate  * The fhandle is the file handle that the server passes to the client.
40*7c478bd9Sstevel@tonic-gate  * All file operations are done using the file handles to refer to a file
41*7c478bd9Sstevel@tonic-gate  * or a directory. The file handle can contain whatever information the
42*7c478bd9Sstevel@tonic-gate  * server needs to distinguish an individual file.
43*7c478bd9Sstevel@tonic-gate  *
44*7c478bd9Sstevel@tonic-gate  * Versions 1 and 2 of the protocol share a filehandle of 32 bytes.
45*7c478bd9Sstevel@tonic-gate  *
46*7c478bd9Sstevel@tonic-gate  * Version 3 supports a 64 byte filehandle that can be used only
47*7c478bd9Sstevel@tonic-gate  * with version 3 of the NFS protocol.
48*7c478bd9Sstevel@tonic-gate  */
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate typedef opaque fhandle[FHSIZE];
51*7c478bd9Sstevel@tonic-gate typedef opaque fhandle3<FHSIZE3>;
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /*
54*7c478bd9Sstevel@tonic-gate  * If a V2 status of zero is returned, the call completed successfully, and
55*7c478bd9Sstevel@tonic-gate  * a file handle for the directory follows. A non-zero status indicates
56*7c478bd9Sstevel@tonic-gate  * some sort of error. The status corresponds with UNIX error numbers.
57*7c478bd9Sstevel@tonic-gate  */
58*7c478bd9Sstevel@tonic-gate union fhstatus switch (unsigned fhs_status) {
59*7c478bd9Sstevel@tonic-gate case 0:
60*7c478bd9Sstevel@tonic-gate 	fhandle fhs_fhandle;
61*7c478bd9Sstevel@tonic-gate default:
62*7c478bd9Sstevel@tonic-gate 	void;
63*7c478bd9Sstevel@tonic-gate };
64*7c478bd9Sstevel@tonic-gate 
65*7c478bd9Sstevel@tonic-gate /*
66*7c478bd9Sstevel@tonic-gate  * This #define is added for backwards compatability with applications
67*7c478bd9Sstevel@tonic-gate  * which reference the old style fhstatus.  The second element of that
68*7c478bd9Sstevel@tonic-gate  * structure was called fhs_fh, instead of the current fhs_fhandle.
69*7c478bd9Sstevel@tonic-gate  */
70*7c478bd9Sstevel@tonic-gate %
71*7c478bd9Sstevel@tonic-gate %#define	fhs_fh	fhstatus_u.fhs_fhandle
72*7c478bd9Sstevel@tonic-gate 
73*7c478bd9Sstevel@tonic-gate /*
74*7c478bd9Sstevel@tonic-gate  * The following status codes are defined for the V3 mount service:
75*7c478bd9Sstevel@tonic-gate  * Note that the precise enum encoding must be followed; the values
76*7c478bd9Sstevel@tonic-gate  * are derived from existing implementation practice, and there is
77*7c478bd9Sstevel@tonic-gate  * no good reason to disturb them.
78*7c478bd9Sstevel@tonic-gate  */
79*7c478bd9Sstevel@tonic-gate enum mountstat3 {
80*7c478bd9Sstevel@tonic-gate         MNT_OK= 0,              /* no error */
81*7c478bd9Sstevel@tonic-gate         MNT3ERR_PERM=1,         /* Not owner */
82*7c478bd9Sstevel@tonic-gate         MNT3ERR_NOENT=2,        /* No such file or directory */
83*7c478bd9Sstevel@tonic-gate         MNT3ERR_IO=5,           /* I/O error */
84*7c478bd9Sstevel@tonic-gate         MNT3ERR_ACCES=13,       /* Permission denied */
85*7c478bd9Sstevel@tonic-gate         MNT3ERR_NOTDIR=20,      /* Not a directory*/
86*7c478bd9Sstevel@tonic-gate         MNT3ERR_INVAL=22,       /* Invalid argument.*/
87*7c478bd9Sstevel@tonic-gate         MNT3ERR_NAMETOOLONG=63, /* File name too long */
88*7c478bd9Sstevel@tonic-gate         MNT3ERR_NOTSUPP=10004,  /* operation not supported */
89*7c478bd9Sstevel@tonic-gate         MNT3ERR_SERVERFAULT=10006 /* An i/o or similar failure caused */
90*7c478bd9Sstevel@tonic-gate                                 /* the server to abandon the request */
91*7c478bd9Sstevel@tonic-gate                                 /* No attributes can be returned. The */
92*7c478bd9Sstevel@tonic-gate                                 /* client should translate this into EIO */
93*7c478bd9Sstevel@tonic-gate };
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate /*
96*7c478bd9Sstevel@tonic-gate  * A V3 server returns a file handle and a list of the authentication
97*7c478bd9Sstevel@tonic-gate  * flavors that the server will accept for this mount.  If the list
98*7c478bd9Sstevel@tonic-gate  * is empty, AUTH_UNIX is required.  Otherwise, any of the flavors
99*7c478bd9Sstevel@tonic-gate  * listed in auth_flavors<> may be used (but no others).
100*7c478bd9Sstevel@tonic-gate  * The values of the authentication flavors are defined in the
101*7c478bd9Sstevel@tonic-gate  * underlying RPC protocol.
102*7c478bd9Sstevel@tonic-gate  */
103*7c478bd9Sstevel@tonic-gate struct mountres3_ok {
104*7c478bd9Sstevel@tonic-gate 	fhandle3 fhandle;
105*7c478bd9Sstevel@tonic-gate 	int auth_flavors<>;
106*7c478bd9Sstevel@tonic-gate };
107*7c478bd9Sstevel@tonic-gate 
108*7c478bd9Sstevel@tonic-gate /*
109*7c478bd9Sstevel@tonic-gate  * If a V3 status of MNT_OK is returned, the call completed successfully, and
110*7c478bd9Sstevel@tonic-gate  * a file handle for the directory follows. Any other status indicates
111*7c478bd9Sstevel@tonic-gate  * some sort of error.
112*7c478bd9Sstevel@tonic-gate  */
113*7c478bd9Sstevel@tonic-gate 
114*7c478bd9Sstevel@tonic-gate union mountres3 switch (mountstat3 fhs_status) {
115*7c478bd9Sstevel@tonic-gate case MNT_OK:
116*7c478bd9Sstevel@tonic-gate         mountres3_ok mountinfo;
117*7c478bd9Sstevel@tonic-gate default:
118*7c478bd9Sstevel@tonic-gate         void;
119*7c478bd9Sstevel@tonic-gate };
120*7c478bd9Sstevel@tonic-gate 
121*7c478bd9Sstevel@tonic-gate /*
122*7c478bd9Sstevel@tonic-gate  * The type dirpath is the pathname of a directory
123*7c478bd9Sstevel@tonic-gate  */
124*7c478bd9Sstevel@tonic-gate typedef string dirpath<MNTPATHLEN>;
125*7c478bd9Sstevel@tonic-gate 
126*7c478bd9Sstevel@tonic-gate /*
127*7c478bd9Sstevel@tonic-gate  * The type name is used for arbitrary names (hostnames, groupnames)
128*7c478bd9Sstevel@tonic-gate  */
129*7c478bd9Sstevel@tonic-gate typedef string name<MNTNAMLEN>;
130*7c478bd9Sstevel@tonic-gate 
131*7c478bd9Sstevel@tonic-gate /*
132*7c478bd9Sstevel@tonic-gate  * A list of who has what mounted. This information is
133*7c478bd9Sstevel@tonic-gate  * strictly advisory, since there is no mechanism to
134*7c478bd9Sstevel@tonic-gate  * enforce the removal of stale information. The strongest
135*7c478bd9Sstevel@tonic-gate  * assertion that can be made is that if a hostname:directory
136*7c478bd9Sstevel@tonic-gate  * pair appears in the list, the server has exported the
137*7c478bd9Sstevel@tonic-gate  * directory to that client at some point since the server
138*7c478bd9Sstevel@tonic-gate  * export data base was (re)initialized. Note also that there
139*7c478bd9Sstevel@tonic-gate  * is no limit on the length of the information returned
140*7c478bd9Sstevel@tonic-gate  * in this structure, and this may cause problems if the
141*7c478bd9Sstevel@tonic-gate  * mount service is accessed via a connectionless transport.
142*7c478bd9Sstevel@tonic-gate  *
143*7c478bd9Sstevel@tonic-gate  * The ifdef will ensure that these are only carried over to
144*7c478bd9Sstevel@tonic-gate  * mount.h - no xdr routines will be generated. We want to
145*7c478bd9Sstevel@tonic-gate  * do these by hand, to avoid the recursive stack-blowing ones
146*7c478bd9Sstevel@tonic-gate  * that rpcgen will generate.
147*7c478bd9Sstevel@tonic-gate  */
148*7c478bd9Sstevel@tonic-gate #ifdef RPC_HDR
149*7c478bd9Sstevel@tonic-gate typedef struct mountbody *mountlist;
150*7c478bd9Sstevel@tonic-gate struct mountbody {
151*7c478bd9Sstevel@tonic-gate 	name ml_hostname;
152*7c478bd9Sstevel@tonic-gate 	dirpath ml_directory;
153*7c478bd9Sstevel@tonic-gate 	mountlist ml_next;
154*7c478bd9Sstevel@tonic-gate };
155*7c478bd9Sstevel@tonic-gate #endif /* RPC_HDR */
156*7c478bd9Sstevel@tonic-gate 
157*7c478bd9Sstevel@tonic-gate /*
158*7c478bd9Sstevel@tonic-gate  * A list of netgroups
159*7c478bd9Sstevel@tonic-gate  */
160*7c478bd9Sstevel@tonic-gate typedef struct groupnode *groups;
161*7c478bd9Sstevel@tonic-gate struct groupnode {
162*7c478bd9Sstevel@tonic-gate 	name gr_name;
163*7c478bd9Sstevel@tonic-gate 	groups gr_next;
164*7c478bd9Sstevel@tonic-gate };
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate /*
167*7c478bd9Sstevel@tonic-gate  * A list of what is exported and to whom
168*7c478bd9Sstevel@tonic-gate  */
169*7c478bd9Sstevel@tonic-gate typedef struct exportnode *exports;
170*7c478bd9Sstevel@tonic-gate struct exportnode {
171*7c478bd9Sstevel@tonic-gate 	dirpath ex_dir;
172*7c478bd9Sstevel@tonic-gate 	groups ex_groups;
173*7c478bd9Sstevel@tonic-gate 	exports ex_next;
174*7c478bd9Sstevel@tonic-gate };
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate /*
177*7c478bd9Sstevel@tonic-gate  * POSIX pathconf information
178*7c478bd9Sstevel@tonic-gate  */
179*7c478bd9Sstevel@tonic-gate struct ppathcnf {
180*7c478bd9Sstevel@tonic-gate 	int	pc_link_max;	/* max links allowed */
181*7c478bd9Sstevel@tonic-gate 	short	pc_max_canon;	/* max line len for a tty */
182*7c478bd9Sstevel@tonic-gate 	short	pc_max_input;	/* input a tty can eat all at once */
183*7c478bd9Sstevel@tonic-gate 	short	pc_name_max;	/* max file name length (dir entry) */
184*7c478bd9Sstevel@tonic-gate 	short	pc_path_max;	/* max path name length (/x/y/x/.. ) */
185*7c478bd9Sstevel@tonic-gate 	short	pc_pipe_buf;	/* size of a pipe (bytes) */
186*7c478bd9Sstevel@tonic-gate 	u_char	pc_vdisable;	/* safe char to turn off c_cc[i] */
187*7c478bd9Sstevel@tonic-gate 	char	pc_xxx;		/* alignment padding; cc_t == char */
188*7c478bd9Sstevel@tonic-gate 	short	pc_mask[2];	/* validity and boolean bits */
189*7c478bd9Sstevel@tonic-gate };
190*7c478bd9Sstevel@tonic-gate 
191*7c478bd9Sstevel@tonic-gate program MOUNTPROG {
192*7c478bd9Sstevel@tonic-gate 	/*
193*7c478bd9Sstevel@tonic-gate 	 * Version one of the mount protocol communicates with version two
194*7c478bd9Sstevel@tonic-gate 	 * of the NFS protocol. The only connecting point is the fhandle
195*7c478bd9Sstevel@tonic-gate 	 * structure, which is the same for both protocols.
196*7c478bd9Sstevel@tonic-gate 	 */
197*7c478bd9Sstevel@tonic-gate 	version MOUNTVERS {
198*7c478bd9Sstevel@tonic-gate 		/*
199*7c478bd9Sstevel@tonic-gate 		 * Does no work. It is made available in all RPC services
200*7c478bd9Sstevel@tonic-gate 		 * to allow server reponse testing and timing
201*7c478bd9Sstevel@tonic-gate 		 */
202*7c478bd9Sstevel@tonic-gate 		void
203*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_NULL(void) = 0;
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate 		/*
206*7c478bd9Sstevel@tonic-gate 		 * If fhs_status is 0, then fhs_fhandle contains the
207*7c478bd9Sstevel@tonic-gate 	 	 * file handle for the directory. This file handle may
208*7c478bd9Sstevel@tonic-gate 		 * be used in the NFS protocol. This procedure also adds
209*7c478bd9Sstevel@tonic-gate 		 * a new entry to the mount list for this client mounting
210*7c478bd9Sstevel@tonic-gate 		 * the directory.
211*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
212*7c478bd9Sstevel@tonic-gate 		 */
213*7c478bd9Sstevel@tonic-gate 		fhstatus
214*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_MNT(dirpath) = 1;
215*7c478bd9Sstevel@tonic-gate 
216*7c478bd9Sstevel@tonic-gate 		/*
217*7c478bd9Sstevel@tonic-gate 		 * Returns the list of remotely mounted filesystems. The
218*7c478bd9Sstevel@tonic-gate 		 * mountlist contains one entry for each hostname and
219*7c478bd9Sstevel@tonic-gate 		 * directory pair.
220*7c478bd9Sstevel@tonic-gate 		 */
221*7c478bd9Sstevel@tonic-gate 		mountlist
222*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_DUMP(void) = 2;
223*7c478bd9Sstevel@tonic-gate 
224*7c478bd9Sstevel@tonic-gate 		/*
225*7c478bd9Sstevel@tonic-gate 		 * Removes the mount list entry for the directory
226*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
227*7c478bd9Sstevel@tonic-gate 		 */
228*7c478bd9Sstevel@tonic-gate 		void
229*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNT(dirpath) = 3;
230*7c478bd9Sstevel@tonic-gate 
231*7c478bd9Sstevel@tonic-gate 		/*
232*7c478bd9Sstevel@tonic-gate 		 * Removes all of the mount list entries for this client
233*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
234*7c478bd9Sstevel@tonic-gate 		 */
235*7c478bd9Sstevel@tonic-gate 		void
236*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNTALL(void) = 4;
237*7c478bd9Sstevel@tonic-gate 
238*7c478bd9Sstevel@tonic-gate 		/*
239*7c478bd9Sstevel@tonic-gate 		 * Returns a list of all the exported filesystems, and which
240*7c478bd9Sstevel@tonic-gate 		 * machines are allowed to import it.
241*7c478bd9Sstevel@tonic-gate 		 */
242*7c478bd9Sstevel@tonic-gate 		exports
243*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_EXPORT(void)  = 5;
244*7c478bd9Sstevel@tonic-gate 
245*7c478bd9Sstevel@tonic-gate 		/*
246*7c478bd9Sstevel@tonic-gate 		 * Identical to MOUNTPROC_EXPORT above
247*7c478bd9Sstevel@tonic-gate 		 */
248*7c478bd9Sstevel@tonic-gate 		exports
249*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_EXPORTALL(void) = 6;
250*7c478bd9Sstevel@tonic-gate 	} = 1;
251*7c478bd9Sstevel@tonic-gate 
252*7c478bd9Sstevel@tonic-gate 	/*
253*7c478bd9Sstevel@tonic-gate 	 * Version two of the mount protocol communicates with version two
254*7c478bd9Sstevel@tonic-gate 	 * of the NFS protocol. It is identical to version one except for a
255*7c478bd9Sstevel@tonic-gate 	 * new procedure call for posix.
256*7c478bd9Sstevel@tonic-gate 	 */
257*7c478bd9Sstevel@tonic-gate 	version MOUNTVERS_POSIX {
258*7c478bd9Sstevel@tonic-gate 		/*
259*7c478bd9Sstevel@tonic-gate 		 * Does no work. It is made available in all RPC services
260*7c478bd9Sstevel@tonic-gate 		 * to allow server reponse testing and timing
261*7c478bd9Sstevel@tonic-gate 		 */
262*7c478bd9Sstevel@tonic-gate 		void
263*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_NULL(void) = 0;
264*7c478bd9Sstevel@tonic-gate 
265*7c478bd9Sstevel@tonic-gate 		/*
266*7c478bd9Sstevel@tonic-gate 		 * If fhs_status is 0, then fhs_fhandle contains the
267*7c478bd9Sstevel@tonic-gate 	 	 * file handle for the directory. This file handle may
268*7c478bd9Sstevel@tonic-gate 		 * be used in the NFS protocol. This procedure also adds
269*7c478bd9Sstevel@tonic-gate 		 * a new entry to the mount list for this client mounting
270*7c478bd9Sstevel@tonic-gate 		 * the directory.
271*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
272*7c478bd9Sstevel@tonic-gate 		 */
273*7c478bd9Sstevel@tonic-gate 		fhstatus
274*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_MNT(dirpath) = 1;
275*7c478bd9Sstevel@tonic-gate 
276*7c478bd9Sstevel@tonic-gate 		/*
277*7c478bd9Sstevel@tonic-gate 		 * Returns the list of remotely mounted filesystems. The
278*7c478bd9Sstevel@tonic-gate 		 * mountlist contains one entry for each hostname and
279*7c478bd9Sstevel@tonic-gate 		 * directory pair.
280*7c478bd9Sstevel@tonic-gate 		 */
281*7c478bd9Sstevel@tonic-gate 		mountlist
282*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_DUMP(void) = 2;
283*7c478bd9Sstevel@tonic-gate 
284*7c478bd9Sstevel@tonic-gate 		/*
285*7c478bd9Sstevel@tonic-gate 		 * Removes the mount list entry for the directory
286*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
287*7c478bd9Sstevel@tonic-gate 		 */
288*7c478bd9Sstevel@tonic-gate 		void
289*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNT(dirpath) = 3;
290*7c478bd9Sstevel@tonic-gate 
291*7c478bd9Sstevel@tonic-gate 		/*
292*7c478bd9Sstevel@tonic-gate 		 * Removes all of the mount list entries for this client
293*7c478bd9Sstevel@tonic-gate 		 * Unix authentication required.
294*7c478bd9Sstevel@tonic-gate 		 */
295*7c478bd9Sstevel@tonic-gate 		void
296*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNTALL(void) = 4;
297*7c478bd9Sstevel@tonic-gate 
298*7c478bd9Sstevel@tonic-gate 		/*
299*7c478bd9Sstevel@tonic-gate 		 * Returns a list of all the exported filesystems, and which
300*7c478bd9Sstevel@tonic-gate 		 * machines are allowed to import it.
301*7c478bd9Sstevel@tonic-gate 		 */
302*7c478bd9Sstevel@tonic-gate 		exports
303*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_EXPORT(void)  = 5;
304*7c478bd9Sstevel@tonic-gate 
305*7c478bd9Sstevel@tonic-gate 		/*
306*7c478bd9Sstevel@tonic-gate 		 * Identical to MOUNTPROC_EXPORT above
307*7c478bd9Sstevel@tonic-gate 		 */
308*7c478bd9Sstevel@tonic-gate 		exports
309*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_EXPORTALL(void) = 6;
310*7c478bd9Sstevel@tonic-gate 
311*7c478bd9Sstevel@tonic-gate 		/*
312*7c478bd9Sstevel@tonic-gate 		 * Posix info over the wire isn't supported in NFS version 2
313*7c478bd9Sstevel@tonic-gate 		 * so we get it here at mount time.
314*7c478bd9Sstevel@tonic-gate 		 */
315*7c478bd9Sstevel@tonic-gate 		ppathcnf
316*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_PATHCONF(dirpath) = 7;
317*7c478bd9Sstevel@tonic-gate 	} = 2;
318*7c478bd9Sstevel@tonic-gate 
319*7c478bd9Sstevel@tonic-gate 	/*
320*7c478bd9Sstevel@tonic-gate 	 * Version 3 of the mount protocol communicates with version 3
321*7c478bd9Sstevel@tonic-gate 	 * of the NFS protocol. The only connecting point is the nfs_fh3
322*7c478bd9Sstevel@tonic-gate 	 * structure, which is the same for both protocols.
323*7c478bd9Sstevel@tonic-gate 	 *
324*7c478bd9Sstevel@tonic-gate 	 * The only significant change over version 2 is that MOUNTPROC_MNT
325*7c478bd9Sstevel@tonic-gate 	 * returns a longer filehandle (64 bytes instead of 32) as well
326*7c478bd9Sstevel@tonic-gate 	 * as authentication information.  MOUNTPROC_PATHCONF is subsumed
327*7c478bd9Sstevel@tonic-gate 	 * into V3 of the NFS protocol and MOUNTPROC_EXPORTALL is eliminated.
328*7c478bd9Sstevel@tonic-gate 	 */
329*7c478bd9Sstevel@tonic-gate 	version MOUNTVERS3 {
330*7c478bd9Sstevel@tonic-gate 		/*
331*7c478bd9Sstevel@tonic-gate 		 * Does no work. It is made available in all RPC services
332*7c478bd9Sstevel@tonic-gate 		 * to allow server reponse testing and timing
333*7c478bd9Sstevel@tonic-gate 		 */
334*7c478bd9Sstevel@tonic-gate 		void
335*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_NULL(void) = 0;
336*7c478bd9Sstevel@tonic-gate 
337*7c478bd9Sstevel@tonic-gate 		/*
338*7c478bd9Sstevel@tonic-gate 		 * Mount a file system.
339*7c478bd9Sstevel@tonic-gate 		 *
340*7c478bd9Sstevel@tonic-gate 		 * If mountres.fhs_status is NFS_OK, then mountres.mountinfo
341*7c478bd9Sstevel@tonic-gate 		 * contains the file handle for the directory and
342*7c478bd9Sstevel@tonic-gate 		 * a list of acceptable authentication flavors. This file
343*7c478bd9Sstevel@tonic-gate 		 * handle may only be used in version 3 of the NFS protocol.
344*7c478bd9Sstevel@tonic-gate 		 * This procedure also results in the server adding a new
345*7c478bd9Sstevel@tonic-gate 		 * entry to its mount list recording that this client has
346*7c478bd9Sstevel@tonic-gate 		 * mounted the directory. Unix authentication or better
347*7c478bd9Sstevel@tonic-gate 		 * is required.
348*7c478bd9Sstevel@tonic-gate 		 */
349*7c478bd9Sstevel@tonic-gate 		mountres3
350*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_MNT(dirpath) = 1;
351*7c478bd9Sstevel@tonic-gate 
352*7c478bd9Sstevel@tonic-gate 		/*
353*7c478bd9Sstevel@tonic-gate 		 * Returns the list of remotely mounted filesystems. The
354*7c478bd9Sstevel@tonic-gate 		 * mountlist contains one entry for each hostname and
355*7c478bd9Sstevel@tonic-gate 		 * directory pair.
356*7c478bd9Sstevel@tonic-gate 		 */
357*7c478bd9Sstevel@tonic-gate 		mountlist
358*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_DUMP(void) = 2;
359*7c478bd9Sstevel@tonic-gate 
360*7c478bd9Sstevel@tonic-gate 		/*
361*7c478bd9Sstevel@tonic-gate 		 * Removes the mount list entry for the directory
362*7c478bd9Sstevel@tonic-gate 		 * Unix authentication or better is required.
363*7c478bd9Sstevel@tonic-gate 		 */
364*7c478bd9Sstevel@tonic-gate 		void
365*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNT(dirpath) = 3;
366*7c478bd9Sstevel@tonic-gate 
367*7c478bd9Sstevel@tonic-gate 		/*
368*7c478bd9Sstevel@tonic-gate 		 * Removes all of the mount list entries for this client
369*7c478bd9Sstevel@tonic-gate 		 * Unix authentication or better is required.
370*7c478bd9Sstevel@tonic-gate 		 */
371*7c478bd9Sstevel@tonic-gate 		void
372*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_UMNTALL(void) = 4;
373*7c478bd9Sstevel@tonic-gate 
374*7c478bd9Sstevel@tonic-gate 		/*
375*7c478bd9Sstevel@tonic-gate 		 * Returns a list of all the exported filesystems, and which
376*7c478bd9Sstevel@tonic-gate 		 * machines are allowed to import each one.
377*7c478bd9Sstevel@tonic-gate 		 */
378*7c478bd9Sstevel@tonic-gate 		exports
379*7c478bd9Sstevel@tonic-gate 		MOUNTPROC_EXPORT(void)  = 5;
380*7c478bd9Sstevel@tonic-gate 
381*7c478bd9Sstevel@tonic-gate 	} = 3;
382*7c478bd9Sstevel@tonic-gate } = 100005;
383