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