Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / kioslave / nfs / mount.x
blob4aaf97de9ade2655cd48ae460ba24ee322b57183
1 %/*
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.
9 % *
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.
13 % *
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.
17 % *
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.
21 % *
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.
25 % *
26 % * Sun Microsystems, Inc.
27 % * 2550 Garcia Avenue
28 % * Mountain View, California  94043
29 % */
31 %/*
32 % * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
33 % */
35 %/* from @(#)mount.x    1.3 91/03/11 TIRPC 1.0 */
38  * Protocol description for the mount program
39  */
41 #ifdef RPC_HDR
42 %#ifndef _rpcsvc_mount_h
43 %#define _rpcsvc_mount_h
44 #endif
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.
55  */
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.
62  */
63 union fhstatus switch (unsigned fhs_status) {
64 case 0:
65         fhandle fhs_fhandle;
66 default:
67         void;
71  * The type dirpath is the pathname of a directory
72  */
73 typedef string dirpath<MNTPATHLEN>;
76  * The type name is used for arbitrary names (hostnames, groupnames)
77  */
78 typedef string name<MNTNAMLEN>;
81  * A list of who has what mounted
82  */
83 typedef struct mountbody *mountlist;
84 struct mountbody {
85         name ml_hostname;
86         dirpath ml_directory;
87         mountlist ml_next;
91  * A list of netgroups
92  */
93 typedef struct groupnode *groups;
94 struct groupnode {
95         name gr_name;
96         groups gr_next;
100  * A list of what is exported and to whom
101  */
102 typedef struct exportnode *exports;
103 struct exportnode {
104         dirpath ex_dir;
105         groups ex_groups;
106         exports ex_next;
110  * POSIX pathconf information
111  */
112 struct ppathcnf {
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 */
124 program MOUNTPROG {
125         /*
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.
129          */
130         version MOUNTVERS {
131                 /*
132                  * Does no work. It is made available in all RPC services
133                  * to allow server reponse testing and timing
134                  */
135                 void
136                 MOUNTPROC_NULL(void) = 0;
138                 /*      
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
143                  * the directory.
144                  * Unix authentication required.
145                  */
146                 fhstatus 
147                 MOUNTPROC_MNT(dirpath) = 1;
149                 /*
150                  * Returns the list of remotely mounted filesystems. The 
151                  * mountlist contains one entry for each hostname and 
152                  * directory pair.
153                  */
154                 mountlist
155                 MOUNTPROC_DUMP(void) = 2;
157                 /*
158                  * Removes the mount list entry for the directory
159                  * Unix authentication required.
160                  */
161                 void
162                 MOUNTPROC_UMNT(dirpath) = 3;
164                 /*
165                  * Removes all of the mount list entries for this client
166                  * Unix authentication required.
167                  */
168                 void
169                 MOUNTPROC_UMNTALL(void) = 4;
171                 /*
172                  * Returns a list of all the exported filesystems, and which
173                  * machines are allowed to import it.
174                  */
175                 exports
176                 MOUNTPROC_EXPORT(void)  = 5;
178                 /*
179                  * Identical to MOUNTPROC_EXPORT above
180                  */
181                 exports
182                 MOUNTPROC_EXPORTALL(void) = 6;
183         } = 1;
185         /*
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
189          * pathconf call.
190          */
191         version MOUNTVERS_POSIX {
192                 /*
193                  * Does no work. It is made available in all RPC services
194                  * to allow server reponse testing and timing
195                  */
196                 void
197                 MOUNTPROC_NULL(void) = 0;
199                 /*      
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
204                  * the directory.
205                  * Unix authentication required.
206                  */
207                 fhstatus 
208                 MOUNTPROC_MNT(dirpath) = 1;
210                 /*
211                  * Returns the list of remotely mounted filesystems. The 
212                  * mountlist contains one entry for each hostname and 
213                  * directory pair.
214                  */
215                 mountlist
216                 MOUNTPROC_DUMP(void) = 2;
218                 /*
219                  * Removes the mount list entry for the directory
220                  * Unix authentication required.
221                  */
222                 void
223                 MOUNTPROC_UMNT(dirpath) = 3;
225                 /*
226                  * Removes all of the mount list entries for this client
227                  * Unix authentication required.
228                  */
229                 void
230                 MOUNTPROC_UMNTALL(void) = 4;
232                 /*
233                  * Returns a list of all the exported filesystems, and which
234                  * machines are allowed to import it.
235                  */
236                 exports
237                 MOUNTPROC_EXPORT(void)  = 5;
239                 /*
240                  * Identical to MOUNTPROC_EXPORT above
241                  */
242                 exports
243                 MOUNTPROC_EXPORTALL(void) = 6;
245                 /*
246                  * POSIX pathconf info (Sun hack)
247                  */
248                 ppathcnf
249                 MOUNTPROC_PATHCONF(dirpath) = 7;
250         } = 2;
251 } = 100005;
253 #ifdef RPC_HDR
254 %#endif /*!_rpcsvc_mount_h*/
255 #endif