Annotation of 43BSDReno/usr.sbin/amd/rpcx/amq.x, revision 1.1.1.1

1.1       root        1: /*
                      2:  * $Id: amq.x,v 5.2 90/06/23 22:20:11 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:  *     @(#)amq.x       5.1 (Berkeley) 7/19/90
                     27:  */
                     28: 
                     29: /*
                     30:  * Protocol description used by the amq program
                     31:  */
                     32: 
                     33: const AMQ_STRLEN = 1024;       /* Maximum length of a pathname */
                     34: 
                     35: /*
                     36:  * The type dirpath is the pathname of a directory
                     37:  */
                     38: typedef string amq_string<AMQ_STRLEN>;
                     39: 
                     40: /*
                     41:  * The type time_type should correspond to the system time_t
                     42:  */
                     43: typedef long time_type;
                     44: 
                     45: /*
                     46:  * A tree of what is mounted
                     47:  */
                     48: struct amq_mount_tree {
                     49:        amq_string      mt_mountinfo;   /* Mounted filesystem */
                     50:        amq_string      mt_directory;   /* Virtual mount */
                     51:        amq_string      mt_mountpoint;  /* Mount point */
                     52:        amq_string      mt_type;        /* Filesystem type */
                     53:        time_type       mt_mounttime;   /* Mount time */
                     54:        u_short         mt_mountuid;    /* Mounter */
                     55:        int             mt_getattr;     /* Count of getattrs */
                     56:        int             mt_lookup;      /* Count of lookups */
                     57:        int             mt_readdir;     /* Count of readdirs */
                     58:        int             mt_readlink;    /* Count of readlinks */
                     59:        int             mt_statfs;      /* Count of statfss */
                     60:        amq_mount_tree  *mt_next;       /* Sibling mount tree */
                     61:        amq_mount_tree  *mt_child;      /* Child mount tree */
                     62: };
                     63: typedef amq_mount_tree *amq_mount_tree_p;
                     64: 
                     65: /*
                     66:  * List of mounted filesystems
                     67:  */
                     68: struct amq_mount_info {
                     69:        amq_string      mi_type;        /* Type of mount */
                     70:        amq_string      mi_mountpt;     /* Mount point */
                     71:        amq_string      mi_mountinfo;   /* Mount info */
                     72:        amq_string      mi_fserver;     /* Fileserver */
                     73:        int             mi_error;       /* Error code */
                     74:        int             mi_refc;        /* References */
                     75:        int             mi_up;          /* Filesystem available */
                     76: };
                     77: typedef amq_mount_info amq_mount_info_list<>;
                     78: 
                     79: /*
                     80:  * A list of mount trees
                     81:  */
                     82: typedef amq_mount_tree_p amq_mount_tree_list<>;
                     83: 
                     84: /*
                     85:  * System wide stats
                     86:  */
                     87: struct amq_mount_stats {
                     88:        int     as_drops;       /* Dropped requests */
                     89:        int     as_stale;       /* Stale NFS handles */
                     90:        int     as_mok;         /* Succesful mounts */
                     91:        int     as_merr;        /* Failed mounts */
                     92:        int     as_uerr;        /* Failed unmounts */
                     93: };
                     94: 
                     95: enum amq_opt {
                     96:        AMOPT_DEBUG=0,
                     97:        AMOPT_LOGFILE=1,
                     98:        AMOPT_XLOG=2,
                     99:        AMOPT_FLUSHMAPC=3
                    100: };
                    101: 
                    102: struct amq_setopt {
                    103:        amq_opt as_opt;         /* Option */
                    104:        amq_string as_str;      /* String */
                    105: };
                    106: 
                    107: program AMQ_PROGRAM {
                    108:        version AMQ_VERSION {
                    109:                /*
                    110:                 * Does no work. It is made available in all RPC services
                    111:                 * to allow server reponse testing and timing
                    112:                 */
                    113:                void
                    114:                AMQPROC_NULL(void) = 0;
                    115: 
                    116:                /*
                    117:                 * Returned the mount tree descending from
                    118:                 * the given directory.  The directory must
                    119:                 * be a top-level mount point of the automounter.
                    120:                 */
                    121:                amq_mount_tree_p
                    122:                AMQPROC_MNTTREE(amq_string) = 1;
                    123: 
                    124:                /*
                    125:                 * Force a timeout unmount on the specified directory.
                    126:                 */
                    127:                void
                    128:                AMQPROC_UMNT(amq_string) = 2;
                    129: 
                    130:                /*
                    131:                 * Obtain system wide statistics from the automounter
                    132:                 */
                    133:                amq_mount_stats
                    134:                AMQPROC_STATS(void) = 3;
                    135: 
                    136:                /*
                    137:                 * Obtain full tree
                    138:                 */
                    139:                amq_mount_tree_list
                    140:                AMQPROC_EXPORT(void) = 4;
                    141: 
                    142:                /*
                    143:                 * Control debug options.
                    144:                 * Return status:
                    145:                 *      -1: debug not available
                    146:                 *       0: everything wonderful
                    147:                 *      >0: number of options not recognised
                    148:                 */
                    149:                int
                    150:                AMQPROC_SETOPT(amq_setopt) = 5;
                    151: 
                    152:                /*
                    153:                 * List of mounted filesystems
                    154:                 */
                    155:                amq_mount_info_list
                    156:                AMQPROC_GETMNTFS(void) = 6;
                    157:        } = 1;
                    158: } = 300019;    /* Allocated by Sun, 89/8/29 */

unix.superglobalmegacorp.com

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