2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 * --- Well, it was hand-edited now, to fix compilation on other systems.... ---
13 /* David: added the #defines below to fix compilation on Mac OS 10.3.9, whose rpc/xdr.h has no int32 macros, only long, short etc. */
15 #ifndef IXDR_GET_INT32
16 #define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++))
18 #ifndef IXDR_GET_U_INT32
19 #define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf))
21 #ifndef IXDR_PUT_INT32
22 #define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v)))
24 #ifndef IXDR_PUT_U_INT32
25 #define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32(buf, (int32_t)(v))
30 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
31 * unrestricted use provided that this legend is included on all tape
32 * media and as a part of the software program in whole or part. Users
33 * may copy or modify Sun RPC without charge, but are not authorized
34 * to license or distribute it to anyone else except as part of a product or
35 * program developed by the user or with the express written consent of
36 * Sun Microsystems, Inc.
38 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
39 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
40 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
42 * Sun RPC is provided with no support and without any obligation on the
43 * part of Sun Microsystems, Inc. to assist in its use, correction,
44 * modification or enhancement.
46 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
47 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
48 * OR ANY PART THEREOF.
50 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
51 * or profits or other special, indirect and consequential damages, even if
52 * Sun has been advised of the possibility of such damages.
54 * Sun Microsystems, Inc.
56 * Mountain View, California 94043
59 * Copyright (c) 1985, 1990 by Sun Microsystems, Inc.
62 /* from @(#)mount.x 1.3 91/03/11 TIRPC 1.0 */
65 xdr_fhandle(XDR
*xdrs
, fhandle objp
)
68 register int32_t *buf
=buf
;
70 if (!xdr_opaque(xdrs
, objp
, FHSIZE
)) {
77 xdr_fhstatus(XDR
*xdrs
, fhstatus
*objp
)
80 register int32_t *buf
=buf
;
82 if (!xdr_u_int(xdrs
, &objp
->fhs_status
)) {
85 switch (objp
->fhs_status
) {
87 if (!xdr_fhandle(xdrs
, objp
->fhstatus_u
.fhs_fhandle
)) {
98 xdr_dirpath(XDR
*xdrs
, dirpath
*objp
)
101 register int32_t *buf
=buf
;
103 if (!xdr_string(xdrs
, objp
, MNTPATHLEN
)) {
110 xdr_name(XDR
*xdrs
, name
*objp
)
113 register int32_t *buf
=buf
;
115 if (!xdr_string(xdrs
, objp
, MNTNAMLEN
)) {
122 xdr_mountlist(XDR
*xdrs
, mountlist
*objp
)
125 register int32_t *buf
=buf
;
127 if (!xdr_pointer(xdrs
, (char **)objp
, sizeof(struct mountbody
), (xdrproc_t
)xdr_mountbody
)) {
134 xdr_mountbody(XDR
*xdrs
, mountbody
*objp
)
137 register int32_t *buf
=buf
;
139 if (!xdr_name(xdrs
, &objp
->ml_hostname
)) {
142 if (!xdr_dirpath(xdrs
, &objp
->ml_directory
)) {
145 if (!xdr_mountlist(xdrs
, &objp
->ml_next
)) {
152 xdr_groups(XDR
*xdrs
, groups
*objp
)
155 register int32_t *buf
=buf
;
157 if (!xdr_pointer(xdrs
, (char **)objp
, sizeof(struct groupnode
), (xdrproc_t
)xdr_groupnode
)) {
164 xdr_groupnode(XDR
*xdrs
, groupnode
*objp
)
167 register int32_t *buf
=buf
;
169 if (!xdr_name(xdrs
, &objp
->gr_name
)) {
172 if (!xdr_groups(xdrs
, &objp
->gr_next
)) {
179 xdr_exports(XDR
*xdrs
, exports
*objp
)
182 register int32_t *buf
=buf
;
184 if (!xdr_pointer(xdrs
, (char **)objp
, sizeof(struct exportnode
), (xdrproc_t
)xdr_exportnode
)) {
191 xdr_exportnode(XDR
*xdrs
, exportnode
*objp
)
194 register int32_t *buf
=buf
;
196 if (!xdr_dirpath(xdrs
, &objp
->ex_dir
)) {
199 if (!xdr_groups(xdrs
, &objp
->ex_groups
)) {
202 if (!xdr_exports(xdrs
, &objp
->ex_next
)) {
209 xdr_ppathcnf(XDR
*xdrs
, ppathcnf
*objp
)
212 register int32_t *buf
=buf
;
216 if (xdrs
->x_op
== XDR_ENCODE
) {
217 buf
= XDR_INLINE(xdrs
, 6 * BYTES_PER_XDR_UNIT
);
219 if (!xdr_int(xdrs
, &objp
->pc_link_max
)) {
222 if (!xdr_short(xdrs
, &objp
->pc_max_canon
)) {
225 if (!xdr_short(xdrs
, &objp
->pc_max_input
)) {
228 if (!xdr_short(xdrs
, &objp
->pc_name_max
)) {
231 if (!xdr_short(xdrs
, &objp
->pc_path_max
)) {
234 if (!xdr_short(xdrs
, &objp
->pc_pipe_buf
)) {
240 IXDR_PUT_U_INT32(buf
,objp
->pc_link_max
);
241 IXDR_PUT_SHORT(buf
,objp
->pc_max_canon
);
242 IXDR_PUT_SHORT(buf
,objp
->pc_max_input
);
243 IXDR_PUT_SHORT(buf
,objp
->pc_name_max
);
244 IXDR_PUT_SHORT(buf
,objp
->pc_path_max
);
245 IXDR_PUT_SHORT(buf
,objp
->pc_pipe_buf
);
247 if (!xdr_u_char(xdrs
, &objp
->pc_vdisable
)) {
250 if (!xdr_char(xdrs
, &objp
->pc_xxx
)) {
253 buf
= XDR_INLINE(xdrs
, 2 * BYTES_PER_XDR_UNIT
);
255 if (!xdr_vector(xdrs
, (char *)objp
->pc_mask
, 2, sizeof(short), (xdrproc_t
)xdr_short
)) {
261 { register short *genp
;
262 for ( i
= 0,genp
=objp
->pc_mask
;
264 IXDR_PUT_SHORT(buf
,*genp
++);
270 } else if (xdrs
->x_op
== XDR_DECODE
) {
271 buf
= XDR_INLINE(xdrs
,6 * BYTES_PER_XDR_UNIT
);
273 if (!xdr_int(xdrs
, &objp
->pc_link_max
)) {
276 if (!xdr_short(xdrs
, &objp
->pc_max_canon
)) {
279 if (!xdr_short(xdrs
, &objp
->pc_max_input
)) {
282 if (!xdr_short(xdrs
, &objp
->pc_name_max
)) {
285 if (!xdr_short(xdrs
, &objp
->pc_path_max
)) {
288 if (!xdr_short(xdrs
, &objp
->pc_pipe_buf
)) {
294 objp
->pc_link_max
= IXDR_GET_U_INT32(buf
);
295 objp
->pc_max_canon
= IXDR_GET_SHORT(buf
);
296 objp
->pc_max_input
= IXDR_GET_SHORT(buf
);
297 objp
->pc_name_max
= IXDR_GET_SHORT(buf
);
298 objp
->pc_path_max
= IXDR_GET_SHORT(buf
);
299 objp
->pc_pipe_buf
= IXDR_GET_SHORT(buf
);
301 if (!xdr_u_char(xdrs
, &objp
->pc_vdisable
)) {
304 if (!xdr_char(xdrs
, &objp
->pc_xxx
)) {
307 buf
= XDR_INLINE(xdrs
, 2 * BYTES_PER_XDR_UNIT
);
309 if (!xdr_vector(xdrs
, (char *)objp
->pc_mask
, 2, sizeof(short), (xdrproc_t
)xdr_short
)) {
315 { register short *genp
;
316 for ( i
= 0,genp
=objp
->pc_mask
;
318 *genp
++ = IXDR_GET_SHORT(buf
);
325 if (!xdr_int(xdrs
, &objp
->pc_link_max
)) {
328 if (!xdr_short(xdrs
, &objp
->pc_max_canon
)) {
331 if (!xdr_short(xdrs
, &objp
->pc_max_input
)) {
334 if (!xdr_short(xdrs
, &objp
->pc_name_max
)) {
337 if (!xdr_short(xdrs
, &objp
->pc_path_max
)) {
340 if (!xdr_short(xdrs
, &objp
->pc_pipe_buf
)) {
343 if (!xdr_u_char(xdrs
, &objp
->pc_vdisable
)) {
346 if (!xdr_char(xdrs
, &objp
->pc_xxx
)) {
349 if (!xdr_vector(xdrs
, (char *)objp
->pc_mask
, 2, sizeof(short), (xdrproc_t
)xdr_short
)) {