Annotation of 43BSDReno/usr.sbin/amd/rpcx/mount.x, revision 1.1

1.1     ! root        1: /*
        !             2:  * $Id: mount.x,v 5.2 90/06/23 22:20:19 jsp Rel $
        !             3:  *
        !             4:  * Copyright (c) 1990 Jan-Simon Pendry
        !             5:  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
        !             6:  * Copyright (c) 1990 The Regents of the University of California.
        !             7:  * All rights reserved.
        !             8:  *
        !             9:  * This code is derived from software contributed to Berkeley by
        !            10:  * Jan-Simon Pendry at Imperial College, London.
        !            11:  *
        !            12:  * Redistribution and use in source and binary forms are permitted provided
        !            13:  * that: (1) source distributions retain this entire copyright notice and
        !            14:  * comment, and (2) distributions including binaries display the following
        !            15:  * acknowledgement:  ``This product includes software developed by the
        !            16:  * University of California, Berkeley and its contributors'' in the
        !            17:  * documentation or other materials provided with the distribution and in
        !            18:  * all advertising materials mentioning features or use of this software.
        !            19:  * Neither the name of the University nor the names of its contributors may
        !            20:  * be used to endorse or promote products derived from this software without
        !            21:  * specific prior written permission.
        !            22:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            23:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            24:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            25:  *
        !            26:  *     @(#)mount.x     5.1 (Berkeley) 7/19/90
        !            27:  */
        !            28: 
        !            29: /*
        !            30:  * Protocol description for the mount program
        !            31:  */
        !            32: 
        !            33: 
        !            34: const MNTPATHLEN = 1024;       /* maximum bytes in a pathname argument */
        !            35: const MNTNAMLEN = 255;         /* maximum bytes in a name argument */
        !            36: const FHSIZE = 32;             /* size in bytes of a file handle */
        !            37: 
        !            38: /*
        !            39:  * The fhandle is the file handle that the server passes to the client.
        !            40:  * All file operations are done using the file handles to refer to a file
        !            41:  * or a directory. The file handle can contain whatever information the
        !            42:  * server needs to distinguish an individual file.
        !            43:  */
        !            44: typedef opaque fhandle[FHSIZE];        
        !            45: 
        !            46: /*
        !            47:  * If a status of zero is returned, the call completed successfully, and 
        !            48:  * a file handle for the directory follows. A non-zero status indicates
        !            49:  * some sort of error. The status corresponds with UNIX error numbers.
        !            50:  */
        !            51: union fhstatus switch (unsigned fhs_status) {
        !            52: case 0:
        !            53:        fhandle fhs_fhandle;
        !            54: default:
        !            55:        void;
        !            56: };
        !            57: 
        !            58: /*
        !            59:  * The type dirpath is the pathname of a directory
        !            60:  */
        !            61: typedef string dirpath<MNTPATHLEN>;
        !            62: 
        !            63: /*
        !            64:  * The type name is used for arbitrary names (hostnames, groupnames)
        !            65:  */
        !            66: typedef string name<MNTNAMLEN>;
        !            67: 
        !            68: /*
        !            69:  * A list of who has what mounted
        !            70:  */
        !            71: typedef struct mountbody *mountlist;
        !            72: struct mountbody {
        !            73:        name ml_hostname;
        !            74:        dirpath ml_directory;
        !            75:        mountlist ml_next;
        !            76: };
        !            77: 
        !            78: /*
        !            79:  * A list of netgroups
        !            80:  */
        !            81: typedef struct groupnode *groups;
        !            82: struct groupnode {
        !            83:        name gr_name;
        !            84:        groups gr_next;
        !            85: };
        !            86: 
        !            87: /*
        !            88:  * A list of what is exported and to whom
        !            89:  */
        !            90: typedef struct exportnode *exports;
        !            91: struct exportnode {
        !            92:        dirpath ex_dir;
        !            93:        groups ex_groups;
        !            94:        exports ex_next;
        !            95: };
        !            96: 
        !            97: program MOUNTPROG {
        !            98:        /*
        !            99:         * Version one of the mount protocol communicates with version two
        !           100:         * of the NFS protocol. The only connecting point is the fhandle 
        !           101:         * structure, which is the same for both protocols.
        !           102:         */
        !           103:        version MOUNTVERS {
        !           104:                /*
        !           105:                 * Does no work. It is made available in all RPC services
        !           106:                 * to allow server reponse testing and timing
        !           107:                 */
        !           108:                void
        !           109:                MOUNTPROC_NULL(void) = 0;
        !           110: 
        !           111:                /*      
        !           112:                 * If fhs_status is 0, then fhs_fhandle contains the
        !           113:                 * file handle for the directory. This file handle may
        !           114:                 * be used in the NFS protocol. This procedure also adds
        !           115:                 * a new entry to the mount list for this client mounting
        !           116:                 * the directory.
        !           117:                 * Unix authentication required.
        !           118:                 */
        !           119:                fhstatus 
        !           120:                MOUNTPROC_MNT(dirpath) = 1;
        !           121: 
        !           122:                /*
        !           123:                 * Returns the list of remotely mounted filesystems. The 
        !           124:                 * mountlist contains one entry for each hostname and 
        !           125:                 * directory pair.
        !           126:                 */
        !           127:                mountlist
        !           128:                MOUNTPROC_DUMP(void) = 2;
        !           129: 
        !           130:                /*
        !           131:                 * Removes the mount list entry for the directory
        !           132:                 * Unix authentication required.
        !           133:                 */
        !           134:                void
        !           135:                MOUNTPROC_UMNT(dirpath) = 3;
        !           136: 
        !           137:                /*
        !           138:                 * Removes all of the mount list entries for this client
        !           139:                 * Unix authentication required.
        !           140:                 */
        !           141:                void
        !           142:                MOUNTPROC_UMNTALL(void) = 4;
        !           143: 
        !           144:                /*
        !           145:                 * Returns a list of all the exported filesystems, and which
        !           146:                 * machines are allowed to import it.
        !           147:                 */
        !           148:                exports
        !           149:                MOUNTPROC_EXPORT(void)  = 5;
        !           150:        
        !           151:                /*
        !           152:                 * Identical to MOUNTPROC_EXPORT above
        !           153:                 */
        !           154:                exports
        !           155:                MOUNTPROC_EXPORTALL(void) = 6;
        !           156:        } = 1;
        !           157: } = 100005;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.