1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright (c) 1999,2001 by Sun Microsystems, Inc.
24 * All rights reserved.
25 */
26 /*
27 * Please do not edit this file.
28 * It was generated using rpcgen.
29 */
30
31 #include <rpc/rpc.h>
32 #include <rpcsvc/bootparam_prot.h>
33
34 /* LINTLIBRARY */
35
36 bool_t
xdr_bp_machine_name_t(XDR * xdrs,bp_machine_name_t * objp)37 xdr_bp_machine_name_t(XDR *xdrs, bp_machine_name_t *objp)
38 {
39 if (!xdr_string(xdrs, objp, MAX_MACHINE_NAME)) {
40 return (FALSE);
41 }
42 return (TRUE);
43 }
44
45 bool_t
xdr_bp_path_t(XDR * xdrs,bp_path_t * objp)46 xdr_bp_path_t(XDR *xdrs, bp_path_t *objp)
47 {
48 if (!xdr_string(xdrs, objp, MAX_PATH_LEN)) {
49 return (FALSE);
50 }
51 return (TRUE);
52 }
53
54 bool_t
xdr_bp_fileid_t(XDR * xdrs,bp_fileid_t * objp)55 xdr_bp_fileid_t(XDR *xdrs, bp_fileid_t *objp)
56 {
57 if (!xdr_string(xdrs, objp, MAX_FILEID)) {
58 return (FALSE);
59 }
60 return (TRUE);
61 }
62
63 bool_t
xdr_ip_addr_t(XDR * xdrs,ip_addr_t * objp)64 xdr_ip_addr_t(XDR *xdrs, ip_addr_t *objp)
65 {
66 if (!xdr_char(xdrs, &objp->net)) {
67 return (FALSE);
68 }
69 if (!xdr_char(xdrs, &objp->host)) {
70 return (FALSE);
71 }
72 if (!xdr_char(xdrs, &objp->lh)) {
73 return (FALSE);
74 }
75 if (!xdr_char(xdrs, &objp->impno)) {
76 return (FALSE);
77 }
78 return (TRUE);
79 }
80
81 bool_t
xdr_bp_address(XDR * xdrs,bp_address * objp)82 xdr_bp_address(XDR *xdrs, bp_address *objp)
83 {
84 if (!xdr_int(xdrs, &objp->address_type)) {
85 return (FALSE);
86 }
87 switch (objp->address_type) {
88 case IP_ADDR_TYPE:
89 if (!xdr_ip_addr_t(xdrs, &objp->bp_address_u.ip_addr)) {
90 return (FALSE);
91 }
92 break;
93 default:
94 return (FALSE);
95 }
96 return (TRUE);
97 }
98
99 bool_t
xdr_bp_whoami_arg(XDR * xdrs,bp_whoami_arg * objp)100 xdr_bp_whoami_arg(XDR *xdrs, bp_whoami_arg *objp)
101 {
102 if (!xdr_bp_address(xdrs, &objp->client_address)) {
103 return (FALSE);
104 }
105 return (TRUE);
106 }
107
108 bool_t
xdr_bp_whoami_res(XDR * xdrs,bp_whoami_res * objp)109 xdr_bp_whoami_res(XDR *xdrs, bp_whoami_res *objp)
110 {
111 if (!xdr_bp_machine_name_t(xdrs, &objp->client_name)) {
112 return (FALSE);
113 }
114 if (!xdr_bp_machine_name_t(xdrs, &objp->domain_name)) {
115 return (FALSE);
116 }
117 if (!xdr_bp_address(xdrs, &objp->router_address)) {
118 return (FALSE);
119 }
120 return (TRUE);
121 }
122
123 bool_t
xdr_bp_getfile_arg(XDR * xdrs,bp_getfile_arg * objp)124 xdr_bp_getfile_arg(XDR *xdrs, bp_getfile_arg *objp)
125 {
126 if (!xdr_bp_machine_name_t(xdrs, &objp->client_name)) {
127 return (FALSE);
128 }
129 if (!xdr_bp_fileid_t(xdrs, &objp->file_id)) {
130 return (FALSE);
131 }
132 return (TRUE);
133 }
134
135 bool_t
xdr_bp_getfile_res(XDR * xdrs,bp_getfile_res * objp)136 xdr_bp_getfile_res(XDR *xdrs, bp_getfile_res *objp)
137 {
138 if (!xdr_bp_machine_name_t(xdrs, &objp->server_name)) {
139 return (FALSE);
140 }
141 if (!xdr_bp_address(xdrs, &objp->server_address)) {
142 return (FALSE);
143 }
144 if (!xdr_bp_path_t(xdrs, &objp->server_path)) {
145 return (FALSE);
146 }
147 return (TRUE);
148 }
149