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
46 const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
47 const MNTNAMLEN = 255; /* maximum bytes in a name argument */
48 const FHSIZE = 32; /* size in bytes of a file handle */
51 * The fhandle is the file handle that the server passes to the client.
52 * All file operations are done using the file handles to refer to a file
53 * or a directory. The file handle can contain whatever information the
54 * server needs to distinguish an individual file.
56 typedef opaque fhandle[FHSIZE];
59 * If a status of zero is returned, the call completed successfully, and
60 * a file handle for the directory follows. A non-zero status indicates
61 * some sort of error. The status corresponds with UNIX error numbers.
63 union fhstatus switch (unsigned fhs_status) {
71 * The type dirpath is the pathname of a directory
73 typedef string dirpath<MNTPATHLEN>;
76 * The type name is used for arbitrary names (hostnames, groupnames)
78 typedef string name<MNTNAMLEN>;
81 * A list of who has what mounted
83 typedef struct mountbody *mountlist;
93 typedef struct groupnode *groups;
100 * A list of what is exported and to whom
102 typedef struct exportnode *exports;
110 * POSIX pathconf information
113 int pc_link_max; /* max links allowed */
114 short pc_max_canon; /* max line len for a tty */
115 short pc_max_input; /* input a tty can eat all at once */
116 short pc_name_max; /* max file name length (dir entry) */
117 short pc_path_max; /* max path name length (/x/y/x/.. ) */
118 short pc_pipe_buf; /* size of a pipe (bytes) */
119 u_char pc_vdisable; /* safe char to turn off c_cc[i] */
120 char pc_xxx; /* alignment padding; cc_t == char */
121 short pc_mask[2]; /* validity and boolean bits */
126 * Version one of the mount protocol communicates with version two
127 * of the NFS protocol. The only connecting point is the fhandle
128 * structure, which is the same for both protocols.
132 * Does no work. It is made available in all RPC services
133 * to allow server reponse testing and timing
136 MOUNTPROC_NULL(void) = 0;
139 * If fhs_status is 0, then fhs_fhandle contains the
140 * file handle for the directory. This file handle may
141 * be used in the NFS protocol. This procedure also adds
142 * a new entry to the mount list for this client mounting
144 * Unix authentication required.
147 MOUNTPROC_MNT(dirpath) = 1;
150 * Returns the list of remotely mounted filesystems. The
151 * mountlist contains one entry for each hostname and
155 MOUNTPROC_DUMP(void) = 2;
158 * Removes the mount list entry for the directory
159 * Unix authentication required.
162 MOUNTPROC_UMNT(dirpath) = 3;
165 * Removes all of the mount list entries for this client
166 * Unix authentication required.
169 MOUNTPROC_UMNTALL(void) = 4;
172 * Returns a list of all the exported filesystems, and which
173 * machines are allowed to import it.
176 MOUNTPROC_EXPORT(void) = 5;
179 * Identical to MOUNTPROC_EXPORT above
182 MOUNTPROC_EXPORTALL(void) = 6;
186 * Version two of the mount protocol communicates with version two
187 * of the NFS protocol.
188 * The only difference from version one is the addition of a POSIX
191 version MOUNTVERS_POSIX {
193 * Does no work. It is made available in all RPC services
194 * to allow server reponse testing and timing
197 MOUNTPROC_NULL(void) = 0;
200 * If fhs_status is 0, then fhs_fhandle contains the
201 * file handle for the directory. This file handle may
202 * be used in the NFS protocol. This procedure also adds
203 * a new entry to the mount list for this client mounting
205 * Unix authentication required.
208 MOUNTPROC_MNT(dirpath) = 1;
211 * Returns the list of remotely mounted filesystems. The
212 * mountlist contains one entry for each hostname and
216 MOUNTPROC_DUMP(void) = 2;
219 * Removes the mount list entry for the directory
220 * Unix authentication required.
223 MOUNTPROC_UMNT(dirpath) = 3;
226 * Removes all of the mount list entries for this client
227 * Unix authentication required.
230 MOUNTPROC_UMNTALL(void) = 4;
233 * Returns a list of all the exported filesystems, and which
234 * machines are allowed to import it.
237 MOUNTPROC_EXPORT(void) = 5;
240 * Identical to MOUNTPROC_EXPORT above
243 MOUNTPROC_EXPORTALL(void) = 6;
246 * POSIX pathconf info (Sun hack)
249 MOUNTPROC_PATHCONF(dirpath) = 7;
254 %#endif /*!_rpcsvc_mount_h*/