2 * Copyright (c) 1997-2006 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
40 * File: am-utils/amq/amq_xdr.c
46 #endif /* HAVE_CONFIG_H */
52 xdr_time_type(XDR *xdrs, time_type *objp)
54 if (!xdr_long(xdrs, (long *) objp)) {
62 xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp)
65 if (!xdr_amq_string(xdrs, &objp->mt_mountinfo)) {
69 if (!xdr_amq_string(xdrs, &objp->mt_directory)) {
73 if (!xdr_amq_string(xdrs, &objp->mt_mountpoint)) {
77 if (!xdr_amq_string(xdrs, &objp->mt_type)) {
81 if (!xdr_time_type(xdrs, &objp->mt_mounttime)) {
85 if (!xdr_u_short(xdrs, &objp->mt_mountuid)) {
89 if (!xdr_int(xdrs, &objp->mt_getattr)) {
93 if (!xdr_int(xdrs, &objp->mt_lookup)) {
97 if (!xdr_int(xdrs, &objp->mt_readdir)) {
101 if (!xdr_int(xdrs, &objp->mt_readlink)) {
105 if (!xdr_int(xdrs, &objp->mt_statfs)) {
109 if (!xdr_pointer(xdrs,
110 (char **) ((voidp) &objp->mt_next),
111 sizeof(amq_mount_tree),
112 (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
116 if (!xdr_pointer(xdrs,
117 (char **) ((voidp) &objp->mt_child),
118 sizeof(amq_mount_tree),
119 (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
128 xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp)
130 if (!xdr_pointer(xdrs,
132 sizeof(amq_mount_tree),
133 (XDRPROC_T_TYPE) xdr_amq_mount_tree)) {
141 xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp)
144 if (!xdr_amq_string(xdrs, &objp->mi_type)) {
148 if (!xdr_amq_string(xdrs, &objp->mi_mountpt)) {
152 if (!xdr_amq_string(xdrs, &objp->mi_mountinfo)) {
156 if (!xdr_amq_string(xdrs, &objp->mi_fserver)) {
160 if (!xdr_int(xdrs, &objp->mi_error)) {
164 if (!xdr_int(xdrs, &objp->mi_refc)) {
168 if (!xdr_int(xdrs, &objp->mi_up)) {
177 xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp)
180 (char **) ((voidp) &objp->amq_mount_info_list_val),
181 (u_int *) &objp->amq_mount_info_list_len,
183 sizeof(amq_mount_info),
184 (XDRPROC_T_TYPE) xdr_amq_mount_info)) {
192 xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp)
195 (char **) ((voidp) &objp->amq_mount_tree_list_val),
196 (u_int *) &objp->amq_mount_tree_list_len,
198 sizeof(amq_mount_tree_p),
199 (XDRPROC_T_TYPE) xdr_amq_mount_tree_p)) {
207 xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp)
210 if (!xdr_int(xdrs, &objp->as_drops)) {
214 if (!xdr_int(xdrs, &objp->as_stale)) {
218 if (!xdr_int(xdrs, &objp->as_mok)) {
222 if (!xdr_int(xdrs, &objp->as_merr)) {
226 if (!xdr_int(xdrs, &objp->as_uerr)) {
235 xdr_amq_opt(XDR *xdrs, amq_opt *objp)
237 if (!xdr_enum(xdrs, (enum_t *) objp)) {
245 xdr_amq_setopt(XDR *xdrs, amq_setopt *objp)
248 if (!xdr_amq_opt(xdrs, &objp->as_opt)) {
252 if (!xdr_amq_string(xdrs, &objp->as_str)) {
261 xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr)
266 return ((*xdr_args) (&xdr, (caddr_t *) args_ptr));