2 % * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 % * unrestricted use provided that this legend is included on all tape
4 % * media and as a part of the software program in whole or part. Users
5 % * may copy or modify Sun RPC without charge, but are not authorized
6 % * to license or distribute it to anyone else except as part of a product or
7 % * program developed by the user or with the express written consent of
8 % * Sun Microsystems, Inc.
10 % * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11 % * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12 % * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
14 % * Sun RPC is provided with no support and without any obligation on the
15 % * part of Sun Microsystems, Inc. to assist in its use, correction,
16 % * modification or enhancement.
18 % * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19 % * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20 % * OR ANY PART THEREOF.
22 % * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23 % * or profits or other special, indirect and consequential damages, even if
24 % * Sun has been advised of the possibility of such damages.
26 % * Sun Microsystems, Inc.
27 % * 2550 Garcia Avenue
28 % * Mountain View, California 94043
32 % * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
35 %/* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
38 * Protocol description for the mount program
42 %#ifndef _rpcsvc_mount_h
43 %#define _rpcsvc_mount_h
47 %#include <string.h> /* for memset() */
49 %#include <asm/types.h>
51 const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
52 const MNTNAMLEN = 255; /* maximum bytes in a name argument */
53 const FHSIZE = 32; /* size in bytes of a file handle */
54 const FHSIZE3 = 64; /* size in bytes of a file handle */
57 * The fhandle is the file handle that the server passes to the client.
58 * All file operations are done using the file handles to refer to a file
59 * or a directory. The file handle can contain whatever information the
60 * server needs to distinguish an individual file.
62 typedef opaque fhandle[FHSIZE];
63 typedef opaque fhandle3<FHSIZE3>;
66 MNT_OK = 0, /* no error */
67 MNT3ERR_PERM = 1, /* not owner */
68 MNT3ERR_NOENT = 2, /* No such file or directory */
69 MNT3ERR_IO = 5, /* I/O error */
70 MNT3ERR_ACCES = 13, /* Permission denied */
71 MNT3ERR_NOTDIR = 20, /* Not a directory */
72 MNT3ERR_INVAL = 22, /* Invalid argument */
73 MNT3ERR_NAMETOOLONG = 63, /* File name too long */
74 MNT3ERR_NOTSUPP = 10004, /* Operation not supported */
75 MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */
79 * If a status of zero is returned, the call completed successfully, and
80 * a file handle for the directory follows. A non-zero status indicates
81 * some sort of error. The status corresponds with UNIX error numbers.
83 union fhstatus switch (unsigned fhs_status) {
95 union mountres3 switch (mountstat3 fhs_status) {
97 mountres3_ok mountinfo;
103 * The type dirpath is the pathname of a directory
105 typedef string dirpath<MNTPATHLEN>;
108 * The type name is used for arbitrary names (hostnames, groupnames)
110 typedef string name<MNTNAMLEN>;
113 * A list of who has what mounted
115 typedef struct mountbody *mountlist;
118 dirpath ml_directory;
123 * A list of netgroups
125 typedef struct groupnode *groups;
132 * A list of what is exported and to whom
134 typedef struct exportnode *exports;
142 * POSIX pathconf information
145 int pc_link_max; /* max links allowed */
146 short pc_max_canon; /* max line len for a tty */
147 short pc_max_input; /* input a tty can eat all at once */
148 short pc_name_max; /* max file name length (dir entry) */
149 short pc_path_max; /* max path name length (/x/y/x/.. ) */
150 short pc_pipe_buf; /* size of a pipe (bytes) */
151 u_char pc_vdisable; /* safe char to turn off c_cc[i] */
152 char pc_xxx; /* alignment padding; cc_t == char */
153 short pc_mask[2]; /* validity and boolean bits */
158 * Version one of the mount protocol communicates with version two
159 * of the NFS protocol. The only connecting point is the fhandle
160 * structure, which is the same for both protocols.
164 * Does no work. It is made available in all RPC services
165 * to allow server reponse testing and timing
168 MOUNTPROC_NULL(void) = 0;
171 * If fhs_status is 0, then fhs_fhandle contains the
172 * file handle for the directory. This file handle may
173 * be used in the NFS protocol. This procedure also adds
174 * a new entry to the mount list for this client mounting
176 * Unix authentication required.
179 MOUNTPROC_MNT(dirpath) = 1;
182 * Returns the list of remotely mounted filesystems. The
183 * mountlist contains one entry for each hostname and
187 MOUNTPROC_DUMP(void) = 2;
190 * Removes the mount list entry for the directory
191 * Unix authentication required.
194 MOUNTPROC_UMNT(dirpath) = 3;
197 * Removes all of the mount list entries for this client
198 * Unix authentication required.
201 MOUNTPROC_UMNTALL(void) = 4;
204 * Returns a list of all the exported filesystems, and which
205 * machines are allowed to import it.
208 MOUNTPROC_EXPORT(void) = 5;
211 * Identical to MOUNTPROC_EXPORT above
214 MOUNTPROC_EXPORTALL(void) = 6;
218 * Version two of the mount protocol communicates with version two
219 * of the NFS protocol.
220 * The only difference from version one is the addition of a POSIX
223 version MOUNTVERS_POSIX {
225 * Does no work. It is made available in all RPC services
226 * to allow server reponse testing and timing
229 MOUNTPROC_NULL(void) = 0;
232 * If fhs_status is 0, then fhs_fhandle contains the
233 * file handle for the directory. This file handle may
234 * be used in the NFS protocol. This procedure also adds
235 * a new entry to the mount list for this client mounting
237 * Unix authentication required.
240 MOUNTPROC_MNT(dirpath) = 1;
243 * Returns the list of remotely mounted filesystems. The
244 * mountlist contains one entry for each hostname and
248 MOUNTPROC_DUMP(void) = 2;
251 * Removes the mount list entry for the directory
252 * Unix authentication required.
255 MOUNTPROC_UMNT(dirpath) = 3;
258 * Removes all of the mount list entries for this client
259 * Unix authentication required.
262 MOUNTPROC_UMNTALL(void) = 4;
265 * Returns a list of all the exported filesystems, and which
266 * machines are allowed to import it.
269 MOUNTPROC_EXPORT(void) = 5;
272 * Identical to MOUNTPROC_EXPORT above
275 MOUNTPROC_EXPORTALL(void) = 6;
278 * POSIX pathconf info (Sun hack)
281 MOUNTPROC_PATHCONF(dirpath) = 7;
285 * Does no work. It is made available in all RPC services
286 * to allow server reponse testing and timing
289 MOUNTPROC3_NULL(void) = 0;
292 * If fhs_status is 0, then fhs_fhandle contains the
293 * file handle for the directory. This file handle may
294 * be used in the NFS protocol. This procedure also adds
295 * a new entry to the mount list for this client mounting
297 * Unix authentication required.
300 MOUNTPROC3_MNT(dirpath) = 1;
303 * Returns the list of remotely mounted filesystems. The
304 * mountlist contains one entry for each hostname and
308 MOUNTPROC3_DUMP(void) = 2;
311 * Removes the mount list entry for the directory
312 * Unix authentication required.
315 MOUNTPROC3_UMNT(dirpath) = 3;
318 * Removes all of the mount list entries for this client
319 * Unix authentication required.
322 MOUNTPROC3_UMNTALL(void) = 4;
325 * Returns a list of all the exported filesystems, and which
326 * machines are allowed to import it.
329 MOUNTPROC3_EXPORT(void) = 5;
335 %#endif /*!_rpcsvc_mount_h*/