Warning, /include/rpcsvc/mount.x is written in an unsupported language. File is not indexed.
0001 /* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */
0002
0003 /*
0004 * Copyright (c) 2010, Oracle America, Inc.
0005 * Redistribution and use in source and binary forms, with or without
0006 * modification, are permitted provided that the following conditions are
0007 * met:
0008 *
0009 * * Redistributions of source code must retain the above copyright
0010 * notice, this list of conditions and the following disclaimer.
0011 * * Redistributions in binary form must reproduce the above
0012 * copyright notice, this list of conditions and the following
0013 * disclaimer in the documentation and/or other materials
0014 * provided with the distribution.
0015 * * Neither the name of the "Oracle America, Inc." nor the names of its
0016 * contributors may be used to endorse or promote products derived
0017 * from this software without specific prior written permission.
0018 *
0019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0020 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0021 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
0022 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
0023 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
0024 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0025 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
0026 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0027 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
0028 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0029 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0030 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0031 */
0032
0033 /*
0034 * Protocol description for the mount program
0035 */
0036
0037
0038 const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
0039 const MNTNAMLEN = 255; /* maximum bytes in a name argument */
0040 const FHSIZE = 32; /* size in bytes of a file handle */
0041
0042 /*
0043 * The fhandle is the file handle that the server passes to the client.
0044 * All file operations are done using the file handles to refer to a file
0045 * or a directory. The file handle can contain whatever information the
0046 * server needs to distinguish an individual file.
0047 */
0048 typedef opaque fhandle[FHSIZE];
0049
0050 /*
0051 * If a status of zero is returned, the call completed successfully, and
0052 * a file handle for the directory follows. A non-zero status indicates
0053 * some sort of error. The status corresponds with UNIX error numbers.
0054 */
0055 union fhstatus switch (unsigned fhs_status) {
0056 case 0:
0057 fhandle fhs_fhandle;
0058 default:
0059 void;
0060 };
0061
0062 /*
0063 * The type dirpath is the pathname of a directory
0064 */
0065 typedef string dirpath<MNTPATHLEN>;
0066
0067 /*
0068 * The type name is used for arbitrary names (hostnames, groupnames)
0069 */
0070 typedef string name<MNTNAMLEN>;
0071
0072 /*
0073 * A list of who has what mounted
0074 */
0075 typedef struct mountbody *mountlist;
0076 struct mountbody {
0077 name ml_hostname;
0078 dirpath ml_directory;
0079 mountlist ml_next;
0080 };
0081
0082 /*
0083 * A list of netgroups
0084 */
0085 typedef struct groupnode *groups;
0086 struct groupnode {
0087 name gr_name;
0088 groups gr_next;
0089 };
0090
0091 /*
0092 * A list of what is exported and to whom
0093 */
0094 typedef struct exportnode *exports;
0095 struct exportnode {
0096 dirpath ex_dir;
0097 groups ex_groups;
0098 exports ex_next;
0099 };
0100
0101 program MOUNTPROG {
0102 /*
0103 * Version one of the mount protocol communicates with version two
0104 * of the NFS protocol. The only connecting point is the fhandle
0105 * structure, which is the same for both protocols.
0106 */
0107 version MOUNTVERS {
0108 /*
0109 * Does no work. It is made available in all RPC services
0110 * to allow server response testing and timing
0111 */
0112 void
0113 MOUNTPROC_NULL(void) = 0;
0114
0115 /*
0116 * If fhs_status is 0, then fhs_fhandle contains the
0117 * file handle for the directory. This file handle may
0118 * be used in the NFS protocol. This procedure also adds
0119 * a new entry to the mount list for this client mounting
0120 * the directory.
0121 * Unix authentication required.
0122 */
0123 fhstatus
0124 MOUNTPROC_MNT(dirpath) = 1;
0125
0126 /*
0127 * Returns the list of remotely mounted filesystems. The
0128 * mountlist contains one entry for each hostname and
0129 * directory pair.
0130 */
0131 mountlist
0132 MOUNTPROC_DUMP(void) = 2;
0133
0134 /*
0135 * Removes the mount list entry for the directory
0136 * Unix authentication required.
0137 */
0138 void
0139 MOUNTPROC_UMNT(dirpath) = 3;
0140
0141 /*
0142 * Removes all of the mount list entries for this client
0143 * Unix authentication required.
0144 */
0145 void
0146 MOUNTPROC_UMNTALL(void) = 4;
0147
0148 /*
0149 * Returns a list of all the exported filesystems, and which
0150 * machines are allowed to import it.
0151 */
0152 exports
0153 MOUNTPROC_EXPORT(void) = 5;
0154
0155 /*
0156 * Identical to MOUNTPROC_EXPORT above
0157 */
0158 exports
0159 MOUNTPROC_EXPORTALL(void) = 6;
0160 } = 1;
0161 } = 100005;