76c0bd1e33a68851771879ef4abe95cd98400914
2 * Copyright (c) 2009, Sun Microsystems, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * - Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 * - Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12 * - Neither the name of Sun Microsystems, Inc. nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
29 * Copyright 1991 Sun Microsystems, Inc.
34 * This file was generated from rpcb_prot.x, but includes only those
35 * routines used with the rpcbind stats facility.
38 //#include <sys/cdefs.h>
42 #ifdef __REACTOS__ // CVE-2017-8779
46 /* Link list of all the stats about getport and getaddr */
49 xdr_rpcbs_addrlist(xdrs
, objp
)
54 if (!xdr_u_int32_t(xdrs
, &objp
->prog
)) {
57 if (!xdr_u_int32_t(xdrs
, &objp
->vers
)) {
60 if (!xdr_int(xdrs
, &objp
->success
)) {
63 if (!xdr_int(xdrs
, &objp
->failure
)) {
66 #ifdef __REACTOS__ // CVE-2017-8779
67 if (!xdr_string(xdrs
, &objp
->netid
, RPC_MAXDATASIZE
)) {
69 if (!xdr_string(xdrs
, &objp
->netid
, (u_int
)~0)) {
74 if (!xdr_pointer(xdrs
, (char **)&objp
->next
,
75 sizeof (rpcbs_addrlist
),
76 (xdrproc_t
)xdr_rpcbs_addrlist
)) {
83 /* Link list of all the stats about rmtcall */
86 xdr_rpcbs_rmtcalllist(xdrs
, objp
)
88 rpcbs_rmtcalllist
*objp
;
92 if (xdrs
->x_op
== XDR_ENCODE
) {
93 buf
= XDR_INLINE(xdrs
, 6 * BYTES_PER_XDR_UNIT
);
95 if (!xdr_u_int32_t(xdrs
, &objp
->prog
)) {
98 if (!xdr_u_int32_t(xdrs
, &objp
->vers
)) {
101 if (!xdr_u_int32_t(xdrs
, &objp
->proc
)) {
104 if (!xdr_int(xdrs
, &objp
->success
)) {
107 if (!xdr_int(xdrs
, &objp
->failure
)) {
110 if (!xdr_int(xdrs
, &objp
->indirect
)) {
114 IXDR_PUT_U_INT32(buf
, objp
->prog
);
115 IXDR_PUT_U_INT32(buf
, objp
->vers
);
116 IXDR_PUT_U_INT32(buf
, objp
->proc
);
117 IXDR_PUT_INT32(buf
, objp
->success
);
118 IXDR_PUT_INT32(buf
, objp
->failure
);
119 IXDR_PUT_INT32(buf
, objp
->indirect
);
121 #ifdef __REACTOS__ // CVE-2017-8779
122 if (!xdr_string(xdrs
, &objp
->netid
, RPC_MAXDATASIZE
)) {
124 if (!xdr_string(xdrs
, &objp
->netid
, (u_int
)~0)) {
128 if (!xdr_pointer(xdrs
, (char **)&objp
->next
,
129 sizeof (rpcbs_rmtcalllist
),
130 (xdrproc_t
)xdr_rpcbs_rmtcalllist
)) {
134 } else if (xdrs
->x_op
== XDR_DECODE
) {
135 buf
= XDR_INLINE(xdrs
, 6 * BYTES_PER_XDR_UNIT
);
137 if (!xdr_u_int32_t(xdrs
, &objp
->prog
)) {
140 if (!xdr_u_int32_t(xdrs
, &objp
->vers
)) {
143 if (!xdr_u_int32_t(xdrs
, &objp
->proc
)) {
146 if (!xdr_int(xdrs
, &objp
->success
)) {
149 if (!xdr_int(xdrs
, &objp
->failure
)) {
152 if (!xdr_int(xdrs
, &objp
->indirect
)) {
156 objp
->prog
= (rpcprog_t
)IXDR_GET_U_INT32(buf
);
157 objp
->vers
= (rpcvers_t
)IXDR_GET_U_INT32(buf
);
158 objp
->proc
= (rpcproc_t
)IXDR_GET_U_INT32(buf
);
159 objp
->success
= (int)IXDR_GET_INT32(buf
);
160 objp
->failure
= (int)IXDR_GET_INT32(buf
);
161 objp
->indirect
= (int)IXDR_GET_INT32(buf
);
163 #ifdef __REACTOS__ // CVE-2017-8779
164 if (!xdr_string(xdrs
, &objp
->netid
, RPC_MAXDATASIZE
)) {
166 if (!xdr_string(xdrs
, &objp
->netid
, (u_int
)~0)) {
170 if (!xdr_pointer(xdrs
, (char **)&objp
->next
,
171 sizeof (rpcbs_rmtcalllist
),
172 (xdrproc_t
)xdr_rpcbs_rmtcalllist
)) {
177 if (!xdr_u_int32_t(xdrs
, &objp
->prog
)) {
180 if (!xdr_u_int32_t(xdrs
, &objp
->vers
)) {
183 if (!xdr_u_int32_t(xdrs
, &objp
->proc
)) {
186 if (!xdr_int(xdrs
, &objp
->success
)) {
189 if (!xdr_int(xdrs
, &objp
->failure
)) {
192 if (!xdr_int(xdrs
, &objp
->indirect
)) {
195 #ifdef __REACTOS__ // CVE-2017-8779
196 if (!xdr_string(xdrs
, &objp
->netid
, RPC_MAXDATASIZE
)) {
198 if (!xdr_string(xdrs
, &objp
->netid
, (u_int
)~0)) {
202 if (!xdr_pointer(xdrs
, (char **)&objp
->next
,
203 sizeof (rpcbs_rmtcalllist
),
204 (xdrproc_t
)xdr_rpcbs_rmtcalllist
)) {
211 xdr_rpcbs_proc(xdrs
, objp
)
215 if (!xdr_vector(xdrs
, (char *)(void *)objp
, RPCBSTAT_HIGHPROC
,
216 sizeof (int), (xdrproc_t
)xdr_int
)) {
223 xdr_rpcbs_addrlist_ptr(xdrs
, objp
)
225 rpcbs_addrlist_ptr
*objp
;
227 if (!xdr_pointer(xdrs
, (char **)objp
, sizeof (rpcbs_addrlist
),
228 (xdrproc_t
)xdr_rpcbs_addrlist
)) {
235 xdr_rpcbs_rmtcalllist_ptr(xdrs
, objp
)
237 rpcbs_rmtcalllist_ptr
*objp
;
239 if (!xdr_pointer(xdrs
, (char **)objp
, sizeof (rpcbs_rmtcalllist
),
240 (xdrproc_t
)xdr_rpcbs_rmtcalllist
)) {
247 xdr_rpcb_stat(xdrs
, objp
)
252 if (!xdr_rpcbs_proc(xdrs
, objp
->info
)) {
255 if (!xdr_int(xdrs
, &objp
->setinfo
)) {
258 if (!xdr_int(xdrs
, &objp
->unsetinfo
)) {
261 if (!xdr_rpcbs_addrlist_ptr(xdrs
, &objp
->addrinfo
)) {
264 if (!xdr_rpcbs_rmtcalllist_ptr(xdrs
, &objp
->rmtinfo
)) {
271 * One rpcb_stat structure is returned for each version of rpcbind
275 xdr_rpcb_stat_byvers(xdrs
, objp
)
277 rpcb_stat_byvers objp
;
279 if (!xdr_vector(xdrs
, (char *)(void *)objp
, RPCBVERS_STAT
,
280 sizeof (rpcb_stat
), (xdrproc_t
)xdr_rpcb_stat
)) {