1 /* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */
2 /* @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro */
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.
12 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
13 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
14 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
16 * Sun RPC is provided with no support and without any obligation on the
17 * part of Sun Microsystems, Inc. to assist in its use, correction,
18 * modification or enhancement.
20 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
21 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
22 * OR ANY PART THEREOF.
24 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
25 * or profits or other special, indirect and consequential damages, even if
26 * Sun has been advised of the possibility of such damages.
28 * Sun Microsystems, Inc.
30 * Mountain View, California 94043
34 * Protocol description for the mount program
38 const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
39 const MNTNAMLEN = 255; /* maximum bytes in a name argument */
40 const FHSIZE = 32; /* size in bytes of a file handle */
43 * The fhandle is the file handle that the server passes to the client.
44 * All file operations are done using the file handles to refer to a file
45 * or a directory. The file handle can contain whatever information the
46 * server needs to distinguish an individual file.
48 typedef opaque fhandle[FHSIZE];
51 * If a status of zero is returned, the call completed successfully, and
52 * a file handle for the directory follows. A non-zero status indicates
53 * some sort of error. The status corresponds with UNIX error numbers.
55 union fhstatus switch (unsigned fhs_status) {
63 * The type dirpath is the pathname of a directory
65 typedef string dirpath<MNTPATHLEN>;
68 * The type name is used for arbitrary names (hostnames, groupnames)
70 typedef string name<MNTNAMLEN>;
73 * A list of who has what mounted
75 typedef struct mountbody *mountlist;
85 typedef struct groupnode *groups;
92 * A list of what is exported and to whom
94 typedef struct exportnode *exports;
103 * Version one of the mount protocol communicates with version two
104 * of the NFS protocol. The only connecting point is the fhandle
105 * structure, which is the same for both protocols.
109 * Does no work. It is made available in all RPC services
110 * to allow server reponse testing and timing
113 MOUNTPROC_NULL(void) = 0;
116 * If fhs_status is 0, then fhs_fhandle contains the
117 * file handle for the directory. This file handle may
118 * be used in the NFS protocol. This procedure also adds
119 * a new entry to the mount list for this client mounting
121 * Unix authentication required.
124 MOUNTPROC_MNT(dirpath) = 1;
127 * Returns the list of remotely mounted filesystems. The
128 * mountlist contains one entry for each hostname and
132 MOUNTPROC_DUMP(void) = 2;
135 * Removes the mount list entry for the directory
136 * Unix authentication required.
139 MOUNTPROC_UMNT(dirpath) = 3;
142 * Removes all of the mount list entries for this client
143 * Unix authentication required.
146 MOUNTPROC_UMNTALL(void) = 4;
149 * Returns a list of all the exported filesystems, and which
150 * machines are allowed to import it.
153 MOUNTPROC_EXPORT(void) = 5;
156 * Identical to MOUNTPROC_EXPORT above
159 MOUNTPROC_EXPORTALL(void) = 6;