June 2025 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
001: /* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */ 002: 003: /* 004: * Copyright (c) 2010, Oracle America, Inc. 005: * Redistribution and use in source and binary forms, with or without 006: * modification, are permitted provided that the following conditions are 007: * met: 008: * 009: * * Redistributions of source code must retain the above copyright 010: * notice, this list of conditions and the following disclaimer. 011: * * Redistributions in binary form must reproduce the above 012: * copyright notice, this list of conditions and the following 013: * disclaimer in the documentation and/or other materials 014: * provided with the distribution. 015: * * Neither the name of the "Oracle America, Inc." nor the names of its 016: * contributors may be used to endorse or promote products derived 017: * from this software without specific prior written permission. 018: * 019: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 020: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 021: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 022: * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 023: * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 024: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 025: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 026: * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 027: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028: * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 029: * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 030: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 031: */ 032: 033: /* 034: * Protocol description for the mount program 035: */ 036: 037: 038: const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ 039: const MNTNAMLEN = 255; /* maximum bytes in a name argument */ 040: const FHSIZE = 32; /* size in bytes of a file handle */ 041: 042: /* 043: * The fhandle is the file handle that the server passes to the client. 044: * All file operations are done using the file handles to refer to a file 045: * or a directory. The file handle can contain whatever information the 046: * server needs to distinguish an individual file. 047: */ 048: typedef opaque fhandle[FHSIZE]; 049: 050: /* 051: * If a status of zero is returned, the call completed successfully, and 052: * a file handle for the directory follows. A non-zero status indicates 053: * some sort of error. The status corresponds with UNIX error numbers. 054: */ 055: union fhstatus switch (unsigned fhs_status) { 056: case 0: 057: fhandle fhs_fhandle; 058: default: 059: void; 060: }; 061: 062: /* 063: * The type dirpath is the pathname of a directory 064: */ 065: typedef string dirpath<MNTPATHLEN>; 066: 067: /* 068: * The type name is used for arbitrary names (hostnames, groupnames) 069: */ 070: typedef string name<MNTNAMLEN>; 071: 072: /* 073: * A list of who has what mounted 074: */ 075: typedef struct mountbody *mountlist; 076: struct mountbody { 077: name ml_hostname; 078: dirpath ml_directory; 079: mountlist ml_next; 080: }; 081: 082: /* 083: * A list of netgroups 084: */ 085: typedef struct groupnode *groups; 086: struct groupnode { 087: name gr_name; 088: groups gr_next; 089: }; 090: 091: /* 092: * A list of what is exported and to whom 093: */ 094: typedef struct exportnode *exports; 095: struct exportnode { 096: dirpath ex_dir; 097: groups ex_groups; 098: exports ex_next; 099: }; 100: 101: program MOUNTPROG { 102: /* 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. 106: */ 107: version MOUNTVERS { 108: /* 109: * Does no work. It is made available in all RPC services 110: * to allow server response testing and timing 111: */ 112: void 113: MOUNTPROC_NULL(void) = 0; 114: 115: /* 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 120: * the directory. 121: * Unix authentication required. 122: */ 123: fhstatus 124: MOUNTPROC_MNT(dirpath) = 1; 125: 126: /* 127: * Returns the list of remotely mounted filesystems. The 128: * mountlist contains one entry for each hostname and 129: * directory pair. 130: */ 131: mountlist 132: MOUNTPROC_DUMP(void) = 2; 133: 134: /* 135: * Removes the mount list entry for the directory 136: * Unix authentication required. 137: */ 138: void 139: MOUNTPROC_UMNT(dirpath) = 3; 140: 141: /* 142: * Removes all of the mount list entries for this client 143: * Unix authentication required. 144: */ 145: void 146: MOUNTPROC_UMNTALL(void) = 4; 147: 148: /* 149: * Returns a list of all the exported filesystems, and which 150: * machines are allowed to import it. 151: */ 152: exports 153: MOUNTPROC_EXPORT(void) = 5; 154: 155: /* 156: * Identical to MOUNTPROC_EXPORT above 157: */ 158: exports 159: MOUNTPROC_EXPORTALL(void) = 6; 160: } = 1; 161: } = 100005; 162: