1 /* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */
4 * Copyright (c) 2010, Oracle America, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials
14 * provided with the distribution.
15 * * Neither the name of the "Oracle America, Inc." nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 response 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;