2 * Please do not edit this file.
3 * It was generated using rpcgen.
12 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
13 * unrestricted use provided that this legend is included on all tape
14 * media and as a part of the software program in whole or part. Users
15 * may copy or modify Sun RPC without charge, but are not authorized
16 * to license or distribute it to anyone else except as part of a product or
17 * program developed by the user or with the express written consent of
18 * Sun Microsystems, Inc.
20 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
21 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
24 * Sun RPC is provided with no support and without any obligation on the
25 * part of Sun Microsystems, Inc. to assist in its use, correction,
26 * modification or enhancement.
28 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
29 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
30 * OR ANY PART THEREOF.
32 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
33 * or profits or other special, indirect and consequential damages, even if
34 * Sun has been advised of the possibility of such damages.
36 * Sun Microsystems, Inc.
38 * Mountain View, California 94043
41 * Copyright (c) 1987, 1990 by Sun Microsystems, Inc.
44 /* from @(#)nfs_prot.x 1.3 91/03/11 TIRPC 1.0 */
47 xdr_nfsstat(XDR
*xdrs
, nfsstat
*objp
)
50 register int32_t *buf
=buf
;
52 if (!xdr_enum(xdrs
, (enum_t
*)objp
)) {
59 xdr_ftype(XDR
*xdrs
, ftype
*objp
)
62 register int32_t *buf
=buf
;
64 if (!xdr_enum(xdrs
, (enum_t
*)objp
)) {
71 xdr_nfs_fh(XDR
*xdrs
, nfs_fh
*objp
)
74 register int32_t *buf
=buf
;
77 if (!xdr_opaque(xdrs
, objp
->data
, NFS_FHSIZE
)) {
84 xdr_nfstime(XDR
*xdrs
, nfstime
*objp
)
87 register int32_t *buf
=buf
;
89 if (!xdr_u_int(xdrs
, &objp
->seconds
)) {
92 if (!xdr_u_int(xdrs
, &objp
->useconds
)) {
99 xdr_fattr(XDR
*xdrs
, fattr
*objp
)
102 register int32_t *buf
=buf
;
105 if (xdrs
->x_op
== XDR_ENCODE
) {
106 if (!xdr_ftype(xdrs
, &objp
->type
)) {
109 buf
= XDR_INLINE(xdrs
,10 * BYTES_PER_XDR_UNIT
);
111 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
114 if (!xdr_u_int(xdrs
, &objp
->nlink
)) {
117 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
120 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
123 if (!xdr_u_int(xdrs
, &objp
->size
)) {
126 if (!xdr_u_int(xdrs
, &objp
->blocksize
)) {
129 if (!xdr_u_int(xdrs
, &objp
->rdev
)) {
132 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
135 if (!xdr_u_int(xdrs
, &objp
->fsid
)) {
138 if (!xdr_u_int(xdrs
, &objp
->fileid
)) {
144 IXDR_PUT_U_LONG(buf
,objp
->mode
);
145 IXDR_PUT_U_LONG(buf
,objp
->nlink
);
146 IXDR_PUT_U_LONG(buf
,objp
->uid
);
147 IXDR_PUT_U_LONG(buf
,objp
->gid
);
148 IXDR_PUT_U_LONG(buf
,objp
->size
);
149 IXDR_PUT_U_LONG(buf
,objp
->blocksize
);
150 IXDR_PUT_U_LONG(buf
,objp
->rdev
);
151 IXDR_PUT_U_LONG(buf
,objp
->blocks
);
152 IXDR_PUT_U_LONG(buf
,objp
->fsid
);
153 IXDR_PUT_U_LONG(buf
,objp
->fileid
);
155 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
158 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
161 if (!xdr_nfstime(xdrs
, &objp
->ctime
)) {
166 } else if (xdrs
->x_op
== XDR_DECODE
) {
167 if (!xdr_ftype(xdrs
, &objp
->type
)) {
170 buf
= XDR_INLINE(xdrs
,10 * BYTES_PER_XDR_UNIT
);
172 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
175 if (!xdr_u_int(xdrs
, &objp
->nlink
)) {
178 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
181 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
184 if (!xdr_u_int(xdrs
, &objp
->size
)) {
187 if (!xdr_u_int(xdrs
, &objp
->blocksize
)) {
190 if (!xdr_u_int(xdrs
, &objp
->rdev
)) {
193 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
196 if (!xdr_u_int(xdrs
, &objp
->fsid
)) {
199 if (!xdr_u_int(xdrs
, &objp
->fileid
)) {
205 objp
->mode
= IXDR_GET_U_LONG(buf
);
206 objp
->nlink
= IXDR_GET_U_LONG(buf
);
207 objp
->uid
= IXDR_GET_U_LONG(buf
);
208 objp
->gid
= IXDR_GET_U_LONG(buf
);
209 objp
->size
= IXDR_GET_U_LONG(buf
);
210 objp
->blocksize
= IXDR_GET_U_LONG(buf
);
211 objp
->rdev
= IXDR_GET_U_LONG(buf
);
212 objp
->blocks
= IXDR_GET_U_LONG(buf
);
213 objp
->fsid
= IXDR_GET_U_LONG(buf
);
214 objp
->fileid
= IXDR_GET_U_LONG(buf
);
216 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
219 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
222 if (!xdr_nfstime(xdrs
, &objp
->ctime
)) {
228 if (!xdr_ftype(xdrs
, &objp
->type
)) {
231 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
234 if (!xdr_u_int(xdrs
, &objp
->nlink
)) {
237 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
240 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
243 if (!xdr_u_int(xdrs
, &objp
->size
)) {
246 if (!xdr_u_int(xdrs
, &objp
->blocksize
)) {
249 if (!xdr_u_int(xdrs
, &objp
->rdev
)) {
252 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
255 if (!xdr_u_int(xdrs
, &objp
->fsid
)) {
258 if (!xdr_u_int(xdrs
, &objp
->fileid
)) {
261 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
264 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
267 if (!xdr_nfstime(xdrs
, &objp
->ctime
)) {
274 xdr_sattr(XDR
*xdrs
, sattr
*objp
)
277 register int32_t *buf
=buf
;
280 if (xdrs
->x_op
== XDR_ENCODE
) {
281 buf
= XDR_INLINE(xdrs
,4 * BYTES_PER_XDR_UNIT
);
283 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
286 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
289 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
292 if (!xdr_u_int(xdrs
, &objp
->size
)) {
298 IXDR_PUT_U_LONG(buf
,objp
->mode
);
299 IXDR_PUT_U_LONG(buf
,objp
->uid
);
300 IXDR_PUT_U_LONG(buf
,objp
->gid
);
301 IXDR_PUT_U_LONG(buf
,objp
->size
);
303 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
306 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
311 } else if (xdrs
->x_op
== XDR_DECODE
) {
312 buf
= XDR_INLINE(xdrs
,4 * BYTES_PER_XDR_UNIT
);
314 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
317 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
320 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
323 if (!xdr_u_int(xdrs
, &objp
->size
)) {
329 objp
->mode
= IXDR_GET_U_LONG(buf
);
330 objp
->uid
= IXDR_GET_U_LONG(buf
);
331 objp
->gid
= IXDR_GET_U_LONG(buf
);
332 objp
->size
= IXDR_GET_U_LONG(buf
);
334 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
337 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
343 if (!xdr_u_int(xdrs
, &objp
->mode
)) {
346 if (!xdr_u_int(xdrs
, &objp
->uid
)) {
349 if (!xdr_u_int(xdrs
, &objp
->gid
)) {
352 if (!xdr_u_int(xdrs
, &objp
->size
)) {
355 if (!xdr_nfstime(xdrs
, &objp
->atime
)) {
358 if (!xdr_nfstime(xdrs
, &objp
->mtime
)) {
365 xdr_filename(XDR
*xdrs
, filename
*objp
)
368 register int32_t *buf
=buf
;
370 if (!xdr_string(xdrs
, objp
, NFS_MAXNAMLEN
)) {
377 xdr_nfspath(XDR
*xdrs
, nfspath
*objp
)
380 register int32_t *buf
=buf
;
382 if (!xdr_string(xdrs
, objp
, NFS_MAXPATHLEN
)) {
389 xdr_attrstat(XDR
*xdrs
, attrstat
*objp
)
392 register int32_t *buf
=buf
;
394 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
397 switch (objp
->status
) {
399 if (!xdr_fattr(xdrs
, &objp
->attrstat_u
.attributes
)) {
410 xdr_sattrargs(XDR
*xdrs
, sattrargs
*objp
)
413 register int32_t *buf
=buf
;
415 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
418 if (!xdr_sattr(xdrs
, &objp
->attributes
)) {
425 xdr_diropargs(XDR
*xdrs
, diropargs
*objp
)
428 register int32_t *buf
=buf
;
430 if (!xdr_nfs_fh(xdrs
, &objp
->dir
)) {
433 if (!xdr_filename(xdrs
, &objp
->name
)) {
440 xdr_diropokres(XDR
*xdrs
, diropokres
*objp
)
443 register int32_t *buf
=buf
;
445 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
448 if (!xdr_fattr(xdrs
, &objp
->attributes
)) {
455 xdr_diropres(XDR
*xdrs
, diropres
*objp
)
458 register int32_t *buf
=buf
;
460 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
463 switch (objp
->status
) {
465 if (!xdr_diropokres(xdrs
, &objp
->diropres_u
.diropres
)) {
476 xdr_readlinkres(XDR
*xdrs
, readlinkres
*objp
)
479 register int32_t *buf
=buf
;
481 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
484 switch (objp
->status
) {
486 if (!xdr_nfspath(xdrs
, &objp
->readlinkres_u
.data
)) {
497 xdr_readargs(XDR
*xdrs
, readargs
*objp
)
500 register int32_t *buf
=buf
;
502 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
505 if (!xdr_u_int(xdrs
, &objp
->offset
)) {
508 if (!xdr_u_int(xdrs
, &objp
->count
)) {
511 if (!xdr_u_int(xdrs
, &objp
->totalcount
)) {
518 xdr_readokres(XDR
*xdrs
, readokres
*objp
)
521 register int32_t *buf
=buf
;
523 if (!xdr_fattr(xdrs
, &objp
->attributes
)) {
526 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
, (u_int
*)&objp
->data
.data_len
, NFS_MAXDATA
)) {
533 xdr_readres(XDR
*xdrs
, readres
*objp
)
536 register int32_t *buf
=buf
;
538 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
541 switch (objp
->status
) {
543 if (!xdr_readokres(xdrs
, &objp
->readres_u
.reply
)) {
554 xdr_writeargs(XDR
*xdrs
, writeargs
*objp
)
557 register int32_t *buf
=buf
;
560 if (xdrs
->x_op
== XDR_ENCODE
) {
561 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
564 buf
= XDR_INLINE(xdrs
,3 * BYTES_PER_XDR_UNIT
);
566 if (!xdr_u_int(xdrs
, &objp
->beginoffset
)) {
569 if (!xdr_u_int(xdrs
, &objp
->offset
)) {
572 if (!xdr_u_int(xdrs
, &objp
->totalcount
)) {
578 IXDR_PUT_U_LONG(buf
,objp
->beginoffset
);
579 IXDR_PUT_U_LONG(buf
,objp
->offset
);
580 IXDR_PUT_U_LONG(buf
,objp
->totalcount
);
582 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
, (u_int
*)&objp
->data
.data_len
, NFS_MAXDATA
)) {
587 } else if (xdrs
->x_op
== XDR_DECODE
) {
588 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
591 buf
= XDR_INLINE(xdrs
,3 * BYTES_PER_XDR_UNIT
);
593 if (!xdr_u_int(xdrs
, &objp
->beginoffset
)) {
596 if (!xdr_u_int(xdrs
, &objp
->offset
)) {
599 if (!xdr_u_int(xdrs
, &objp
->totalcount
)) {
605 objp
->beginoffset
= IXDR_GET_U_LONG(buf
);
606 objp
->offset
= IXDR_GET_U_LONG(buf
);
607 objp
->totalcount
= IXDR_GET_U_LONG(buf
);
609 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
, (u_int
*)&objp
->data
.data_len
, NFS_MAXDATA
)) {
615 if (!xdr_nfs_fh(xdrs
, &objp
->file
)) {
618 if (!xdr_u_int(xdrs
, &objp
->beginoffset
)) {
621 if (!xdr_u_int(xdrs
, &objp
->offset
)) {
624 if (!xdr_u_int(xdrs
, &objp
->totalcount
)) {
627 if (!xdr_bytes(xdrs
, (char **)&objp
->data
.data_val
, (u_int
*)&objp
->data
.data_len
, NFS_MAXDATA
)) {
634 xdr_createargs(XDR
*xdrs
, createargs
*objp
)
637 register int32_t *buf
=buf
;
639 if (!xdr_diropargs(xdrs
, &objp
->where
)) {
642 if (!xdr_sattr(xdrs
, &objp
->attributes
)) {
649 xdr_renameargs(XDR
*xdrs
, renameargs
*objp
)
652 register int32_t *buf
=buf
;
654 if (!xdr_diropargs(xdrs
, &objp
->from
)) {
657 if (!xdr_diropargs(xdrs
, &objp
->to
)) {
664 xdr_linkargs(XDR
*xdrs
, linkargs
*objp
)
667 register int32_t *buf
=buf
;
669 if (!xdr_nfs_fh(xdrs
, &objp
->from
)) {
672 if (!xdr_diropargs(xdrs
, &objp
->to
)) {
679 xdr_symlinkargs(XDR
*xdrs
, symlinkargs
*objp
)
682 register int32_t *buf
=buf
;
684 if (!xdr_diropargs(xdrs
, &objp
->from
)) {
687 if (!xdr_nfspath(xdrs
, &objp
->to
)) {
690 if (!xdr_sattr(xdrs
, &objp
->attributes
)) {
697 xdr_nfscookie(XDR
*xdrs
, nfscookie objp
)
700 register int32_t *buf
=buf
;
702 if (!xdr_opaque(xdrs
, objp
, NFS_COOKIESIZE
)) {
709 xdr_readdirargs(XDR
*xdrs
, readdirargs
*objp
)
712 register int32_t *buf
=buf
;
714 if (!xdr_nfs_fh(xdrs
, &objp
->dir
)) {
717 if (!xdr_nfscookie(xdrs
, objp
->cookie
)) {
720 if (!xdr_u_int(xdrs
, &objp
->count
)) {
727 xdr_entry(XDR
*xdrs
, entry
*objp
)
730 register int32_t *buf
=buf
;
732 if (!xdr_u_int(xdrs
, &objp
->fileid
)) {
735 if (!xdr_filename(xdrs
, &objp
->name
)) {
738 if (!xdr_nfscookie(xdrs
, objp
->cookie
)) {
741 if (!xdr_pointer(xdrs
, (char **)&objp
->nextentry
, sizeof(entry
), (xdrproc_t
)xdr_entry
)) {
748 xdr_dirlist(XDR
*xdrs
, dirlist
*objp
)
751 register int32_t *buf
=buf
;
753 if (!xdr_pointer(xdrs
, (char **)&objp
->entries
, sizeof(entry
), (xdrproc_t
)xdr_entry
)) {
756 if (!xdr_bool(xdrs
, &objp
->eof
)) {
763 xdr_readdirres(XDR
*xdrs
, readdirres
*objp
)
766 register int32_t *buf
=buf
;
768 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
771 switch (objp
->status
) {
773 if (!xdr_dirlist(xdrs
, &objp
->readdirres_u
.reply
)) {
784 xdr_statfsokres(XDR
*xdrs
, statfsokres
*objp
)
787 register int32_t *buf
=buf
;
790 if (xdrs
->x_op
== XDR_ENCODE
) {
791 buf
= XDR_INLINE(xdrs
,5 * BYTES_PER_XDR_UNIT
);
793 if (!xdr_u_int(xdrs
, &objp
->tsize
)) {
796 if (!xdr_u_int(xdrs
, &objp
->bsize
)) {
799 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
802 if (!xdr_u_int(xdrs
, &objp
->bfree
)) {
805 if (!xdr_u_int(xdrs
, &objp
->bavail
)) {
811 IXDR_PUT_U_LONG(buf
,objp
->tsize
);
812 IXDR_PUT_U_LONG(buf
,objp
->bsize
);
813 IXDR_PUT_U_LONG(buf
,objp
->blocks
);
814 IXDR_PUT_U_LONG(buf
,objp
->bfree
);
815 IXDR_PUT_U_LONG(buf
,objp
->bavail
);
819 } else if (xdrs
->x_op
== XDR_DECODE
) {
820 buf
= XDR_INLINE(xdrs
,5 * BYTES_PER_XDR_UNIT
);
822 if (!xdr_u_int(xdrs
, &objp
->tsize
)) {
825 if (!xdr_u_int(xdrs
, &objp
->bsize
)) {
828 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
831 if (!xdr_u_int(xdrs
, &objp
->bfree
)) {
834 if (!xdr_u_int(xdrs
, &objp
->bavail
)) {
840 objp
->tsize
= IXDR_GET_U_LONG(buf
);
841 objp
->bsize
= IXDR_GET_U_LONG(buf
);
842 objp
->blocks
= IXDR_GET_U_LONG(buf
);
843 objp
->bfree
= IXDR_GET_U_LONG(buf
);
844 objp
->bavail
= IXDR_GET_U_LONG(buf
);
849 if (!xdr_u_int(xdrs
, &objp
->tsize
)) {
852 if (!xdr_u_int(xdrs
, &objp
->bsize
)) {
855 if (!xdr_u_int(xdrs
, &objp
->blocks
)) {
858 if (!xdr_u_int(xdrs
, &objp
->bfree
)) {
861 if (!xdr_u_int(xdrs
, &objp
->bavail
)) {
868 xdr_statfsres(XDR
*xdrs
, statfsres
*objp
)
871 register int32_t *buf
=buf
;
873 if (!xdr_nfsstat(xdrs
, &objp
->status
)) {
876 switch (objp
->status
) {
878 if (!xdr_statfsokres(xdrs
, &objp
->statfsres_u
.reply
)) {