xref: /openbsd/usr.sbin/amd/rpcx/amq.h (revision 404b540a)
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. Neither the name of the University nor the names of its contributors
19  *    may be used to endorse or promote products derived from this software
20  *    without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  *
34  *	from: @(#)amq.h	8.1 (Berkeley) 6/6/93
35  *	$Id: amq.h,v 1.4 2003/06/02 23:36:52 millert Exp $
36  *
37  */
38 
39 #define AMQ_STRLEN 1024
40 
41 typedef char *amq_string;
42 bool_t xdr_amq_string();
43 
44 
45 typedef int *time_type;
46 bool_t xdr_time_type();
47 
48 
49 struct amq_mount_tree {
50 	amq_string mt_mountinfo;
51 	amq_string mt_directory;
52 	amq_string mt_mountpoint;
53 	amq_string mt_type;
54 	time_type mt_mounttime;
55 	u_short mt_mountuid;
56 	int mt_getattr;
57 	int mt_lookup;
58 	int mt_readdir;
59 	int mt_readlink;
60 	int mt_statfs;
61 	struct amq_mount_tree *mt_next;
62 	struct amq_mount_tree *mt_child;
63 };
64 typedef struct amq_mount_tree amq_mount_tree;
65 bool_t xdr_amq_mount_tree();
66 
67 
68 typedef amq_mount_tree *amq_mount_tree_p;
69 bool_t xdr_amq_mount_tree_p();
70 
71 
72 struct amq_mount_info {
73 	amq_string mi_type;
74 	amq_string mi_mountpt;
75 	amq_string mi_mountinfo;
76 	amq_string mi_fserver;
77 	int mi_error;
78 	int mi_refc;
79 	int mi_up;
80 };
81 typedef struct amq_mount_info amq_mount_info;
82 bool_t xdr_amq_mount_info();
83 
84 
85 typedef struct {
86 	u_int amq_mount_info_list_len;
87 	amq_mount_info *amq_mount_info_list_val;
88 } amq_mount_info_list;
89 bool_t xdr_amq_mount_info_list();
90 
91 
92 typedef struct {
93 	u_int amq_mount_tree_list_len;
94 	amq_mount_tree_p *amq_mount_tree_list_val;
95 } amq_mount_tree_list;
96 bool_t xdr_amq_mount_tree_list();
97 
98 
99 struct amq_mount_stats {
100 	int as_drops;
101 	int as_stale;
102 	int as_mok;
103 	int as_merr;
104 	int as_uerr;
105 };
106 typedef struct amq_mount_stats amq_mount_stats;
107 bool_t xdr_amq_mount_stats();
108 
109 
110 enum amq_opt {
111 	AMOPT_DEBUG = 0,
112 	AMOPT_LOGFILE = 1,
113 	AMOPT_XLOG = 2,
114 	AMOPT_FLUSHMAPC = 3
115 };
116 typedef enum amq_opt amq_opt;
117 bool_t xdr_amq_opt();
118 
119 
120 struct amq_setopt {
121 	amq_opt as_opt;
122 	amq_string as_str;
123 };
124 typedef struct amq_setopt amq_setopt;
125 bool_t xdr_amq_setopt();
126 
127 
128 #define AMQ_PROGRAM ((u_long)300019)
129 #define AMQ_VERSION ((u_long)1)
130 #define AMQPROC_NULL ((u_long)0)
131 extern void *amqproc_null_1();
132 #define AMQPROC_MNTTREE ((u_long)1)
133 extern amq_mount_tree_p *amqproc_mnttree_1();
134 #define AMQPROC_UMNT ((u_long)2)
135 extern void *amqproc_umnt_1();
136 #define AMQPROC_STATS ((u_long)3)
137 extern amq_mount_stats *amqproc_stats_1();
138 #define AMQPROC_EXPORT ((u_long)4)
139 extern amq_mount_tree_list *amqproc_export_1();
140 #define AMQPROC_SETOPT ((u_long)5)
141 extern int *amqproc_setopt_1();
142 #define AMQPROC_GETMNTFS ((u_long)6)
143 extern amq_mount_info_list *amqproc_getmntfs_1();
144 #define AMQPROC_MOUNT ((u_long)7)
145 extern int *amqproc_mount_1();
146 #define AMQPROC_GETVERS ((u_long)8)
147 extern amq_string *amqproc_getvers_1();
148 
149