1 /* 2 * Copyright (c) 1990 Jan-Simon Pendry 3 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 4 * Copyright (c) 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry at Imperial College, London. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the University of 21 * California, Berkeley and its contributors. 22 * 4. Neither the name of the University nor the names of its contributors 23 * may be used to endorse or promote products derived from this software 24 * without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)amq.h 8.1 (Berkeley) 6/6/93 39 * $Id: amq.h,v 1.2 1997/01/31 14:42:22 graichen Exp $ 40 * 41 */ 42 43 #define AMQ_STRLEN 1024 44 45 typedef char *amq_string; 46 bool_t xdr_amq_string(); 47 48 49 typedef int *time_type; 50 bool_t xdr_time_type(); 51 52 53 struct amq_mount_tree { 54 amq_string mt_mountinfo; 55 amq_string mt_directory; 56 amq_string mt_mountpoint; 57 amq_string mt_type; 58 time_type mt_mounttime; 59 u_short mt_mountuid; 60 int mt_getattr; 61 int mt_lookup; 62 int mt_readdir; 63 int mt_readlink; 64 int mt_statfs; 65 struct amq_mount_tree *mt_next; 66 struct amq_mount_tree *mt_child; 67 }; 68 typedef struct amq_mount_tree amq_mount_tree; 69 bool_t xdr_amq_mount_tree(); 70 71 72 typedef amq_mount_tree *amq_mount_tree_p; 73 bool_t xdr_amq_mount_tree_p(); 74 75 76 struct amq_mount_info { 77 amq_string mi_type; 78 amq_string mi_mountpt; 79 amq_string mi_mountinfo; 80 amq_string mi_fserver; 81 int mi_error; 82 int mi_refc; 83 int mi_up; 84 }; 85 typedef struct amq_mount_info amq_mount_info; 86 bool_t xdr_amq_mount_info(); 87 88 89 typedef struct { 90 u_int amq_mount_info_list_len; 91 amq_mount_info *amq_mount_info_list_val; 92 } amq_mount_info_list; 93 bool_t xdr_amq_mount_info_list(); 94 95 96 typedef struct { 97 u_int amq_mount_tree_list_len; 98 amq_mount_tree_p *amq_mount_tree_list_val; 99 } amq_mount_tree_list; 100 bool_t xdr_amq_mount_tree_list(); 101 102 103 struct amq_mount_stats { 104 int as_drops; 105 int as_stale; 106 int as_mok; 107 int as_merr; 108 int as_uerr; 109 }; 110 typedef struct amq_mount_stats amq_mount_stats; 111 bool_t xdr_amq_mount_stats(); 112 113 114 enum amq_opt { 115 AMOPT_DEBUG = 0, 116 AMOPT_LOGFILE = 1, 117 AMOPT_XLOG = 2, 118 AMOPT_FLUSHMAPC = 3 119 }; 120 typedef enum amq_opt amq_opt; 121 bool_t xdr_amq_opt(); 122 123 124 struct amq_setopt { 125 amq_opt as_opt; 126 amq_string as_str; 127 }; 128 typedef struct amq_setopt amq_setopt; 129 bool_t xdr_amq_setopt(); 130 131 132 #define AMQ_PROGRAM ((u_long)300019) 133 #define AMQ_VERSION ((u_long)1) 134 #define AMQPROC_NULL ((u_long)0) 135 extern voidp amqproc_null_1(); 136 #define AMQPROC_MNTTREE ((u_long)1) 137 extern amq_mount_tree_p *amqproc_mnttree_1(); 138 #define AMQPROC_UMNT ((u_long)2) 139 extern voidp amqproc_umnt_1(); 140 #define AMQPROC_STATS ((u_long)3) 141 extern amq_mount_stats *amqproc_stats_1(); 142 #define AMQPROC_EXPORT ((u_long)4) 143 extern amq_mount_tree_list *amqproc_export_1(); 144 #define AMQPROC_SETOPT ((u_long)5) 145 extern int *amqproc_setopt_1(); 146 #define AMQPROC_GETMNTFS ((u_long)6) 147 extern amq_mount_info_list *amqproc_getmntfs_1(); 148 #define AMQPROC_MOUNT ((u_long)7) 149 extern int *amqproc_mount_1(); 150 #define AMQPROC_GETVERS ((u_long)8) 151 extern amq_string *amqproc_getvers_1(); 152 153