|
Packit Service |
82fcde |
/* @(#)mount.x 2.1 88/08/01 4.0 RPCSRC */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Copyright (c) 2010, Oracle America, Inc.
|
|
Packit Service |
82fcde |
* Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
82fcde |
* modification, are permitted provided that the following conditions are
|
|
Packit Service |
82fcde |
* met:
|
|
Packit Service |
82fcde |
*
|
|
Packit Service |
82fcde |
* * Redistributions of source code must retain the above copyright
|
|
Packit Service |
82fcde |
* notice, this list of conditions and the following disclaimer.
|
|
Packit Service |
82fcde |
* * Redistributions in binary form must reproduce the above
|
|
Packit Service |
82fcde |
* copyright notice, this list of conditions and the following
|
|
Packit Service |
82fcde |
* disclaimer in the documentation and/or other materials
|
|
Packit Service |
82fcde |
* provided with the distribution.
|
|
Packit Service |
82fcde |
* * Neither the name of the "Oracle America, Inc." nor the names of its
|
|
Packit Service |
82fcde |
* contributors may be used to endorse or promote products derived
|
|
Packit Service |
82fcde |
* from this software without specific prior written permission.
|
|
Packit Service |
82fcde |
*
|
|
Packit Service |
82fcde |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit Service |
82fcde |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit Service |
82fcde |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
Packit Service |
82fcde |
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
Packit Service |
82fcde |
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
Packit Service |
82fcde |
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit Service |
82fcde |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
Packit Service |
82fcde |
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
Packit Service |
82fcde |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
Packit Service |
82fcde |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
Packit Service |
82fcde |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit Service |
82fcde |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Protocol description for the mount program
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */
|
|
Packit Service |
82fcde |
const MNTNAMLEN = 255; /* maximum bytes in a name argument */
|
|
Packit Service |
82fcde |
const FHSIZE = 32; /* size in bytes of a file handle */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* The fhandle is the file handle that the server passes to the client.
|
|
Packit Service |
82fcde |
* All file operations are done using the file handles to refer to a file
|
|
Packit Service |
82fcde |
* or a directory. The file handle can contain whatever information the
|
|
Packit Service |
82fcde |
* server needs to distinguish an individual file.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef opaque fhandle[FHSIZE];
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* If a status of zero is returned, the call completed successfully, and
|
|
Packit Service |
82fcde |
* a file handle for the directory follows. A non-zero status indicates
|
|
Packit Service |
82fcde |
* some sort of error. The status corresponds with UNIX error numbers.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
union fhstatus switch (unsigned fhs_status) {
|
|
Packit Service |
82fcde |
case 0:
|
|
Packit Service |
82fcde |
fhandle fhs_fhandle;
|
|
Packit Service |
82fcde |
default:
|
|
Packit Service |
82fcde |
void;
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* The type dirpath is the pathname of a directory
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef string dirpath<MNTPATHLEN>;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* The type name is used for arbitrary names (hostnames, groupnames)
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef string name<MNTNAMLEN>;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* A list of who has what mounted
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef struct mountbody *mountlist;
|
|
Packit Service |
82fcde |
struct mountbody {
|
|
Packit Service |
82fcde |
name ml_hostname;
|
|
Packit Service |
82fcde |
dirpath ml_directory;
|
|
Packit Service |
82fcde |
mountlist ml_next;
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* A list of netgroups
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef struct groupnode *groups;
|
|
Packit Service |
82fcde |
struct groupnode {
|
|
Packit Service |
82fcde |
name gr_name;
|
|
Packit Service |
82fcde |
groups gr_next;
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* A list of what is exported and to whom
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
typedef struct exportnode *exports;
|
|
Packit Service |
82fcde |
struct exportnode {
|
|
Packit Service |
82fcde |
dirpath ex_dir;
|
|
Packit Service |
82fcde |
groups ex_groups;
|
|
Packit Service |
82fcde |
exports ex_next;
|
|
Packit Service |
82fcde |
};
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
program MOUNTPROG {
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Version one of the mount protocol communicates with version two
|
|
Packit Service |
82fcde |
* of the NFS protocol. The only connecting point is the fhandle
|
|
Packit Service |
82fcde |
* structure, which is the same for both protocols.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
version MOUNTVERS {
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Does no work. It is made available in all RPC services
|
|
Packit Service |
82fcde |
* to allow server response testing and timing
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
void
|
|
Packit Service |
82fcde |
MOUNTPROC_NULL(void) = 0;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* If fhs_status is 0, then fhs_fhandle contains the
|
|
Packit Service |
82fcde |
* file handle for the directory. This file handle may
|
|
Packit Service |
82fcde |
* be used in the NFS protocol. This procedure also adds
|
|
Packit Service |
82fcde |
* a new entry to the mount list for this client mounting
|
|
Packit Service |
82fcde |
* the directory.
|
|
Packit Service |
82fcde |
* Unix authentication required.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
fhstatus
|
|
Packit Service |
82fcde |
MOUNTPROC_MNT(dirpath) = 1;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Returns the list of remotely mounted filesystems. The
|
|
Packit Service |
82fcde |
* mountlist contains one entry for each hostname and
|
|
Packit Service |
82fcde |
* directory pair.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
mountlist
|
|
Packit Service |
82fcde |
MOUNTPROC_DUMP(void) = 2;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Removes the mount list entry for the directory
|
|
Packit Service |
82fcde |
* Unix authentication required.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
void
|
|
Packit Service |
82fcde |
MOUNTPROC_UMNT(dirpath) = 3;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Removes all of the mount list entries for this client
|
|
Packit Service |
82fcde |
* Unix authentication required.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
void
|
|
Packit Service |
82fcde |
MOUNTPROC_UMNTALL(void) = 4;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Returns a list of all the exported filesystems, and which
|
|
Packit Service |
82fcde |
* machines are allowed to import it.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
exports
|
|
Packit Service |
82fcde |
MOUNTPROC_EXPORT(void) = 5;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* Identical to MOUNTPROC_EXPORT above
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
exports
|
|
Packit Service |
82fcde |
MOUNTPROC_EXPORTALL(void) = 6;
|
|
Packit Service |
82fcde |
} = 1;
|
|
Packit Service |
82fcde |
} = 100005;
|