Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / contrib / amd / include / amq_defs.h
blob6564e24ba4af090ba10196358ce74b96a2735b30
1 /*
2 * Copyright (c) 1997-1999 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgment:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
39 * %W% (Berkeley) %G%
41 * $Id: amq_defs.h,v 1.3 1999/09/08 23:36:52 ezk Exp $
45 #ifndef _AMQ_DEFS_H
46 #define _AMQ_DEFS_H
49 * MACROS
51 #ifndef AMQ_SIZE
52 # define AMQ_SIZE 16384
53 #endif /* not AMQ_SIZE */
54 #define AMQ_STRLEN 2048
55 #define AMQ_PROGRAM ((u_long)300019)
56 #define AMQ_VERSION ((u_long)1)
57 #define AMQPROC_NULL ((u_long)0)
58 #define AMQPROC_MNTTREE ((u_long)1)
59 #define AMQPROC_UMNT ((u_long)2)
60 #define AMQPROC_STATS ((u_long)3)
61 #define AMQPROC_EXPORT ((u_long)4)
62 #define AMQPROC_SETOPT ((u_long)5)
63 #define AMQPROC_GETMNTFS ((u_long)6)
64 #define AMQPROC_MOUNT ((u_long)7)
65 #define AMQPROC_GETVERS ((u_long)8)
66 #define AMQPROC_GETPID ((u_long)9)
69 * TYPEDEFS
71 typedef long *time_type;
72 typedef struct amq_mount_info amq_mount_info;
73 typedef struct amq_mount_stats amq_mount_stats;
74 typedef struct amq_mount_tree amq_mount_tree;
75 typedef struct amq_setopt amq_setopt;
76 typedef amq_mount_tree *amq_mount_tree_p;
79 * STRUCTURES:
81 struct amq_mount_tree {
82 amq_string mt_mountinfo;
83 amq_string mt_directory;
84 amq_string mt_mountpoint;
85 amq_string mt_type;
86 time_type mt_mounttime;
87 u_short mt_mountuid;
88 int mt_getattr;
89 int mt_lookup;
90 int mt_readdir;
91 int mt_readlink;
92 int mt_statfs;
93 struct amq_mount_tree *mt_next;
94 struct amq_mount_tree *mt_child;
97 struct amq_mount_info {
98 amq_string mi_type;
99 amq_string mi_mountpt;
100 amq_string mi_mountinfo;
101 amq_string mi_fserver;
102 int mi_error;
103 int mi_refc;
104 int mi_up;
107 typedef struct {
108 u_int amq_mount_info_list_len;
109 amq_mount_info *amq_mount_info_list_val;
110 } amq_mount_info_list;
112 typedef struct {
113 u_int amq_mount_tree_list_len;
114 amq_mount_tree_p *amq_mount_tree_list_val;
115 } amq_mount_tree_list;
117 struct amq_mount_stats {
118 int as_drops;
119 int as_stale;
120 int as_mok;
121 int as_merr;
122 int as_uerr;
125 enum amq_opt {
126 AMOPT_DEBUG = 0,
127 AMOPT_LOGFILE = 1,
128 AMOPT_XLOG = 2,
129 AMOPT_FLUSHMAPC = 3
131 typedef enum amq_opt amq_opt; /* enum typedefs should be after enum */
133 struct amq_setopt {
134 amq_opt as_opt;
135 amq_string as_str;
139 * EXTERNALS:
141 * external definitions for amqproc_*_1() have been moved off to private
142 * headers in lib/amu.h, amd/amd.h, etc. They have to be private since the
143 * same named functions appear in different places with different prototypes
144 * an functionality.
146 extern bool_t xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp);
147 extern bool_t xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp);
148 extern bool_t xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp);
149 extern bool_t xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp);
150 extern bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp);
151 extern bool_t xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp);
152 extern bool_t xdr_amq_opt(XDR *xdrs, amq_opt *objp);
153 extern bool_t xdr_amq_setopt(XDR *xdrs, amq_setopt *objp);
154 extern bool_t xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr);
155 extern bool_t xdr_time_type(XDR *xdrs, time_type *objp);
157 #endif /* not _AMQ_DEFS_H */