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.
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
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
41 * $Id: amq_xdr.c,v 1.2 1999/01/10 21:53:59 ezk Exp $
47 #endif /* HAVE_CONFIG_H */
53 xdr_time_type(XDR *xdrs, time_type *objp)
55 if (!xdr_long(xdrs, (long *) objp)) {
63 xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
66 if (!xdr_amq_string(xdrs, &objp->mt_mountinfo)) {
70 if (!xdr_amq_string(xdrs, &objp->mt_directory)) {
74 if (!xdr_amq_string(xdrs, &objp->mt_mountpoint)) {
78 if (!xdr_amq_string(xdrs, &objp->mt_type)) {
82 if (!xdr_time_type(xdrs, &objp->mt_mounttime)) {
86 if (!xdr_u_short(xdrs, &objp->mt_mountuid)) {
90 if (!xdr_int(xdrs, &objp->mt_getattr)) {
94 if (!xdr_int(xdrs, &objp->mt_lookup)) {
98 if (!xdr_int(xdrs, &objp->mt_readdir)) {
102 if (!xdr_int(xdrs, &objp->mt_readlink)) {
106 if (!xdr_int(xdrs, &objp->mt_statfs)) {
110 if (!xdr_pointer(xdrs, (char **) &objp->mt_next, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
114 if (!xdr_pointer(xdrs, (char **) &objp->mt_child, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
123 xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp)
125 if (!xdr_pointer(xdrs, (char **) objp, sizeof(amq_mount_tree), (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
133 xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp)
136 if (!xdr_amq_string(xdrs, &objp->mi_type)) {
140 if (!xdr_amq_string(xdrs, &objp->mi_mountpt)) {
144 if (!xdr_amq_string(xdrs, &objp->mi_mountinfo)) {
148 if (!xdr_amq_string(xdrs, &objp->mi_fserver)) {
152 if (!xdr_int(xdrs, &objp->mi_error)) {
156 if (!xdr_int(xdrs, &objp->mi_refc)) {
160 if (!xdr_int(xdrs, &objp->mi_up)) {
169 xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp)
172 (char **) &objp->amq_mount_info_list_val,
173 (u_int *) &objp->amq_mount_info_list_len,
175 sizeof(amq_mount_info),
176 (XDRPROC_T_TYPE) xdr_amq_mount_info)) {
184 xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp)
187 (char **) &objp->amq_mount_tree_list_val,
188 (u_int *) &objp->amq_mount_tree_list_len,
190 sizeof(amq_mount_tree_p),
191 (XDRPROC_T_TYPE) xdr_amq_mount_tree_p)) {
199 xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp)
202 if (!xdr_int(xdrs, &objp->as_drops)) {
206 if (!xdr_int(xdrs, &objp->as_stale)) {
210 if (!xdr_int(xdrs, &objp->as_mok)) {
214 if (!xdr_int(xdrs, &objp->as_merr)) {
218 if (!xdr_int(xdrs, &objp->as_uerr)) {
227 xdr_amq_opt(XDR *xdrs, amq_opt *objp)
229 if (!xdr_enum(xdrs, (enum_t *) objp)) {
237 xdr_amq_setopt(XDR *xdrs, amq_setopt *objp)
240 if (!xdr_amq_opt(xdrs, &objp->as_opt)) {
244 if (!xdr_amq_string(xdrs, &objp->as_str)) {
253 xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr)
258 return ((*xdr_args) (&xdr, (caddr_t *) args_ptr));