2 * Copyright (c) 1997-1999 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
41 * $Id: xdr_func.c,v 1.2 1999/01/10 21:54:39 ezk Exp $
46 * Complete list of all possible xdr functions which may be needed.
50 #endif /* HAVE_CONFIG_H */
59 # define A_MAXNAME 255
60 # endif /* not A_MAXNAME */
62 # define A_MAXOPTS 255
63 # endif /* not A_MAXOPTS */
65 # define A_MAXPATH 1024
66 # endif /* not A_MAXPATH */
67 #endif /* HAVE_FS_AUTOFS */
69 /* forward definitions, are they needed? */
70 extern bool_t
xdr_exportnode(XDR
*xdrs
, exportnode
*objp
);
71 extern bool_t
xdr_groupnode(XDR
*xdrs
, groupnode
*objp
);
72 extern bool_t
xdr_name(XDR
*xdrs
, name
*objp
);
75 #ifndef HAVE_XDR_ATTRSTAT
77 xdr_attrstat(XDR
*xdrs
, nfsattrstat
*objp
)
81 plog(XLOG_DEBUG
, "xdr_attrstat:");
84 if (!xdr_nfsstat(xdrs
, &objp
->ns_status
)) {
87 switch (objp
->ns_status
) {
89 if (!xdr_fattr(xdrs
, &objp
->ns_u
.ns_attr_u
)) {
98 #endif /* not HAVE_XDR_ATTRSTAT */
101 #ifndef HAVE_XDR_CREATEARGS
103 xdr_createargs(XDR
*xdrs
, nfscreateargs
*objp
)
107 plog(XLOG_DEBUG
, "xdr_createargs:");
110 if (!xdr_diropargs(xdrs
, &objp
->ca_where
)) {
113 if (!xdr_sattr(xdrs
, &objp
->ca_attributes
)) {
118 #endif /* not HAVE_XDR_CREATEARGS */
121 #ifndef HAVE_XDR_DIRLIST
123 xdr_dirlist(XDR
*xdrs
, nfsdirlist
*objp
)
127 plog(XLOG_DEBUG
, "xdr_dirlist:");
130 if (!xdr_pointer(xdrs
, (char **) &objp
->dl_entries
, sizeof(nfsentry
), (XDRPROC_T_TYPE
) xdr_entry
)) {
133 if (!xdr_bool(xdrs
, &objp
->dl_eof
)) {
138 #endif /* not HAVE_XDR_DIRLIST */
141 #ifndef HAVE_XDR_DIROPARGS
143 xdr_diropargs(XDR
*xdrs
, nfsdiropargs
*objp
)
147 plog(XLOG_DEBUG
, "xdr_diropargs:");
150 if (!xdr_nfs_fh(xdrs
, &objp
->da_fhandle
)) {
153 if (!xdr_filename(xdrs
, &objp
->da_name
)) {
158 #endif /* not HAVE_XDR_DIROPARGS */
161 #ifndef HAVE_XDR_DIROPOKRES
163 xdr_diropokres(XDR
*xdrs
, nfsdiropokres
*objp
)
167 plog(XLOG_DEBUG
, "xdr_diropokres:");
170 if (!xdr_nfs_fh(xdrs
, &objp
->drok_fhandle
)) {
173 if (!xdr_fattr(xdrs
, &objp
->drok_attributes
)) {
178 #endif /* not HAVE_XDR_DIROPOKRES */
181 #ifndef HAVE_XDR_DIROPRES
183 xdr_diropres(XDR
*xdrs
, nfsdiropres
*objp
)
187 plog(XLOG_DEBUG
, "xdr_diropres:");
190 if (!xdr_nfsstat(xdrs
, &objp
->dr_status
)) {
193 switch (objp
->dr_status
) {
195 if (!xdr_diropokres(xdrs
, &objp
->dr_u
.dr_drok_u
)) {
204 #endif /* not HAVE_XDR_DIROPRES */
207 #ifndef HAVE_XDR_DIRPATH
209 xdr_dirpath(XDR
*xdrs
, dirpath
*objp
)
213 plog(XLOG_DEBUG
, "xdr_dirpath:");
216 if (!xdr_string(xdrs
, objp
, MNTPATHLEN
)) {
221 #endif /* not HAVE_XDR_DIRPATH */
224 #ifndef HAVE_XDR_ENTRY
226 xdr_entry(XDR
*xdrs
, nfsentry
*objp
)
230 plog(XLOG_DEBUG
, "xdr_entry:");
233 if (!xdr_u_int(xdrs
, &objp
->ne_fileid
)) {
236 if (!xdr_filename(xdrs
, &objp
->ne_name
)) {
239 if (!xdr_nfscookie(xdrs
, objp
->ne_cookie
)) {
242 if (!xdr_pointer(xdrs
, (char **) &objp
->ne_nextentry
, sizeof(nfsentry
), (XDRPROC_T_TYPE
) xdr_entry
)) {
247 #endif /* not HAVE_XDR_ENTRY */
250 #ifndef HAVE_XDR_EXPORTNODE
252 xdr_exportnode(XDR
*xdrs
, exportnode
*objp
)
256 plog(XLOG_DEBUG
, "xdr_exportnode:");
259 if (!xdr_dirpath(xdrs
, &objp
->ex_dir
)) {
263 * This cast to (groups) is needed for Irix6. If you change it, it
264 * may produce a warning/error on other systems.
266 if (!xdr_groups(xdrs
, (groups
) &objp
->ex_groups
)) {
269 if (!xdr_exports(xdrs
, &objp
->ex_next
)) {
274 #endif /* not HAVE_XDR_EXPORTNODE */
277 #ifndef HAVE_XDR_EXPORTS
279 xdr_exports(XDR
*xdrs
, exports
*objp
)
283 plog(XLOG_DEBUG
, "xdr_exports:");
286 if (!xdr_pointer(xdrs
, (char **) objp
, sizeof(exportnode
), (XDRPROC_T_TYPE
) xdr_exportnode
)) {
291 #endif /* not HAVE_XDR_EXPORTS */
294 #ifndef HAVE_XDR_FATTR
296 xdr_fattr(XDR
*xdrs
, nfsfattr
*objp
)
300 plog(XLOG_DEBUG
, "xdr_fattr:");
303 if (!xdr_ftype(xdrs
, &objp
->na_type
)) {
306 if (!xdr_u_int(xdrs
, &objp
->na_mode
)) {
309 if (!xdr_u_int(xdrs
, &objp
->na_nlink
)) {
312 if (!xdr_u_int(xdrs
, &objp
->na_uid
)) {
315 if (!xdr_u_int(xdrs
, &objp
->na_gid
)) {
318 if (!xdr_u_int(xdrs
, &objp
->na_size
)) {
321 if (!xdr_u_int(xdrs
, &objp
->na_blocksize
)) {
324 if (!xdr_u_int(xdrs
, &objp
->na_rdev
)) {
327 if (!xdr_u_int(xdrs
, &objp
->na_blocks
)) {
330 if (!xdr_u_int(xdrs
, &objp
->na_fsid
)) {
333 if (!xdr_u_int(xdrs
, &objp
->na_fileid
)) {
336 if (!xdr_nfstime(xdrs
, &objp
->na_atime
)) {
339 if (!xdr_nfstime(xdrs
, &objp
->na_mtime
)) {
342 if (!xdr_nfstime(xdrs
, &objp
->na_ctime
)) {
347 #endif /* not HAVE_XDR_FATTR */
350 #ifndef HAVE_XDR_FHANDLE
352 xdr_fhandle(XDR
*xdrs
, fhandle objp
)
356 plog(XLOG_DEBUG
, "xdr_fhandle:");
359 if (!xdr_opaque(xdrs
, objp
, NFS_FHSIZE
)) {
364 #endif /* not HAVE_XDR_FHANDLE */
367 #ifndef HAVE_XDR_FHSTATUS
369 xdr_fhstatus(XDR
*xdrs
, fhstatus
*objp
)
373 plog(XLOG_DEBUG
, "xdr_fhstatus:");
376 if (!xdr_u_int(xdrs
, &objp
->fhs_status
)) {
379 if (objp
->fhs_status
== 0 && !xdr_fhandle(xdrs
, objp
->fhs_fh
)) {
384 #endif /* not HAVE_XDR_FHSTATUS */
387 #ifndef HAVE_XDR_FILENAME
389 xdr_filename(XDR
*xdrs
, filename
*objp
)
393 plog(XLOG_DEBUG
, "xdr_filename:");
396 if (!xdr_string(xdrs
, objp
, NFS_MAXNAMLEN
)) {
401 #endif /* not HAVE_XDR_FILENAME */
404 #ifndef HAVE_XDR_FTYPE
406 xdr_ftype(XDR
*xdrs
, nfsftype
*objp
)
410 plog(XLOG_DEBUG
, "xdr_ftype:");
413 if (!xdr_enum(xdrs
, (enum_t
*) objp
)) {
418 #endif /* not HAVE_XDR_FTYPE */
421 #ifndef HAVE_XDR_GROUPNODE
423 xdr_groupnode(XDR
*xdrs
, groupnode
*objp
)
427 plog(XLOG_DEBUG
, "xdr_groupnode:");
430 if (!xdr_name(xdrs
, &objp
->gr_name
)) {
434 * This cast to (groups) is needed for Irix6. If you change it, it
435 * may produce a warning/error on other systems.
437 if (!xdr_groups(xdrs
, (groups
) &objp
->gr_next
)) {
442 #endif /* not HAVE_XDR_GROUPNODE */
445 #ifndef HAVE_XDR_GROUPS
447 xdr_groups(XDR
*xdrs
, groups objp
)
451 plog(XLOG_DEBUG
, "xdr_groups:");
454 if (!xdr_pointer(xdrs
, (char **) objp
, sizeof(groupnode
), (XDRPROC_T_TYPE
) xdr_groupnode
)) {
459 #endif /* not HAVE_XDR_GROUPS */
462 #ifndef HAVE_XDR_LINKARGS
464 xdr_linkargs(XDR
*xdrs
, nfslinkargs
*objp
)
468 plog(XLOG_DEBUG
, "xdr_linkargs:");
471 if (!xdr_nfs_fh(xdrs
, &objp
->la_fhandle
)) {
474 if (!xdr_diropargs(xdrs
, &objp
->la_to
)) {
479 #endif /* not HAVE_XDR_LINKARGS */
482 #ifndef HAVE_XDR_MOUNTBODY
484 xdr_mountbody(XDR
*xdrs
, mountbody
*objp
)
488 plog(XLOG_DEBUG
, "xdr_mountbody:");
491 if (!xdr_name(xdrs
, &objp
->ml_hostname
)) {
494 if (!xdr_dirpath(xdrs
, &objp
->ml_directory
)) {
497 if (!xdr_mountlist(xdrs
, &objp
->ml_next
)) {
502 #endif /* not HAVE_XDR_MOUNTBODY */
505 #ifndef HAVE_XDR_MOUNTLIST
507 xdr_mountlist(XDR
*xdrs
, mountlist
*objp
)
511 plog(XLOG_DEBUG
, "xdr_mountlist:");
514 if (!xdr_pointer(xdrs
, (char **) objp
, sizeof(mountbody
), (XDRPROC_T_TYPE
) xdr_mountbody
)) {
519 #endif /* not HAVE_XDR_MOUNTLIST */
522 #if defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3)
524 * This ifdef is a hack: this whole file needs to be compiled
525 * only if the system has NFS V3 and does not have the xdr_mountres3
526 * function. Autoconf should pick this source file to compile only
527 * if these two conditions apply.
531 xdr_fhandle3(XDR
*xdrs
, fhandle3
*objp
)
535 plog(XLOG_DEBUG
, "xdr_fhandle3:");
539 (char **) &objp
->fhandle3_val
,
540 (u_int
*) &objp
->fhandle3_len
,
548 xdr_mountstat3(XDR
*xdrs
, mountstat3
*objp
)
552 plog(XLOG_DEBUG
, "xdr_mountstat3:");
555 if (!xdr_enum(xdrs
, (enum_t
*)objp
))
562 xdr_mountres3_ok(XDR
*xdrs
, mountres3_ok
*objp
)
566 plog(XLOG_DEBUG
, "xdr_mountres3_ok:");
569 if (!xdr_fhandle3(xdrs
, &objp
->fhandle
))
572 (char **)&objp
->auth_flavors
.auth_flavors_val
,
573 (u_int
*) &objp
->auth_flavors
.auth_flavors_len
,
576 (xdrproc_t
) xdr_int
))
583 xdr_mountres3(XDR
*xdrs
, mountres3
*objp
)
587 plog(XLOG_DEBUG
, "xdr_mountres3:");
590 if (!xdr_mountstat3(xdrs
, &objp
->fhs_status
))
593 if (objp
->fhs_status
== 0) { /* 0 == MNT_OK or MNT3_OK */
594 if (!xdr_mountres3_ok(xdrs
, &objp
->mountres3_u
.mountinfo
))
599 #endif /* defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3) */
602 #ifndef HAVE_XDR_NAME
604 xdr_name(XDR
*xdrs
, name
*objp
)
608 plog(XLOG_DEBUG
, "xdr_name:");
611 if (!xdr_string(xdrs
, objp
, MNTNAMLEN
)) {
616 #endif /* not HAVE_XDR_NAME */
619 #ifndef HAVE_XDR_NFS_FH
621 xdr_nfs_fh(XDR
*xdrs
, am_nfs_fh
*objp
)
625 plog(XLOG_DEBUG
, "xdr_nfs_fh:");
628 if (!xdr_opaque(xdrs
, (caddr_t
) objp
->fh_data
, NFS_FHSIZE
)) {
633 #endif /* not HAVE_XDR_NFS_FH */
636 #ifndef HAVE_XDR_NFSCOOKIE
638 xdr_nfscookie(XDR
*xdrs
, nfscookie objp
)
642 plog(XLOG_DEBUG
, "xdr_nfscookie:");
645 if (!xdr_opaque(xdrs
, objp
, NFS_COOKIESIZE
)) {
650 #endif /* not HAVE_XDR_NFSCOOKIE */
653 #ifndef HAVE_XDR_NFSPATH
655 xdr_nfspath(XDR
*xdrs
, nfspath
*objp
)
659 plog(XLOG_DEBUG
, "xdr_nfspath:");
662 if (!xdr_string(xdrs
, objp
, NFS_MAXPATHLEN
)) {
667 #endif /* not HAVE_XDR_NFSPATH */
670 #ifndef HAVE_XDR_NFSSTAT
672 xdr_nfsstat(XDR
*xdrs
, nfsstat
*objp
)
676 plog(XLOG_DEBUG
, "xdr_nfsstat:");
679 if (!xdr_enum(xdrs
, (enum_t
*) objp
)) {
684 #endif /* not HAVE_XDR_NFSSTAT */
687 #ifndef HAVE_XDR_NFSTIME
689 xdr_nfstime(XDR
*xdrs
, nfstime
*objp
)
693 plog(XLOG_DEBUG
, "xdr_nfstime:");
696 if (!xdr_u_int(xdrs
, (u_int
*) &objp
->nt_seconds
)) {
699 if (!xdr_u_int(xdrs
, (u_int
*) &objp
->nt_useconds
)) {
704 #endif /* not HAVE_XDR_NFSTIME */
707 #ifndef HAVE_XDR_POINTER
709 xdr_pointer(register XDR
*xdrs
, char **objpp
, u_int obj_size
, XDRPROC_T_TYPE xdr_obj
)
713 plog(XLOG_DEBUG
, "xdr_pointer:");
719 more_data
= (*objpp
!= NULL
);
720 if (!xdr_bool(xdrs
, &more_data
)) {
728 return (xdr_reference(xdrs
, objpp
, obj_size
, xdr_obj
));
730 #endif /* not HAVE_XDR_POINTER */
733 #ifndef HAVE_XDR_READARGS
735 xdr_readargs(XDR
*xdrs
, nfsreadargs
*objp
)
739 plog(XLOG_DEBUG
, "xdr_readargs:");
742 if (!xdr_nfs_fh(xdrs
, &objp
->ra_fhandle
)) {
745 if (!xdr_u_int(xdrs
, &objp
->ra_offset
)) {
748 if (!xdr_u_int(xdrs
, &objp
->ra_count
)) {
751 if (!xdr_u_int(xdrs
, &objp
->ra_totalcount
)) {
756 #endif /* not HAVE_XDR_READARGS */
759 #ifndef HAVE_XDR_READDIRARGS
761 xdr_readdirargs(XDR
*xdrs
, nfsreaddirargs
*objp
)
765 plog(XLOG_DEBUG
, "xdr_readdirargs:");
768 if (!xdr_nfs_fh(xdrs
, &objp
->rda_fhandle
)) {
771 if (!xdr_nfscookie(xdrs
, objp
->rda_cookie
)) {
774 if (!xdr_u_int(xdrs
, &objp
->rda_count
)) {
779 #endif /* not HAVE_XDR_READDIRARGS */
782 #ifndef HAVE_XDR_READDIRRES
784 xdr_readdirres(XDR
*xdrs
, nfsreaddirres
*objp
)
788 plog(XLOG_DEBUG
, "xdr_readdirres:");
791 if (!xdr_nfsstat(xdrs
, &objp
->rdr_status
)) {
794 switch (objp
->rdr_status
) {
796 if (!xdr_dirlist(xdrs
, &objp
->rdr_u
.rdr_reply_u
)) {
805 #endif /* not HAVE_XDR_READDIRRES */
808 #ifndef HAVE_XDR_READLINKRES
810 xdr_readlinkres(XDR
*xdrs
, nfsreadlinkres
*objp
)
814 plog(XLOG_DEBUG
, "xdr_readlinkres:");
817 if (!xdr_nfsstat(xdrs
, &objp
->rlr_status
)) {
820 switch (objp
->rlr_status
) {
822 if (!xdr_nfspath(xdrs
, &objp
->rlr_u
.rlr_data_u
)) {
831 #endif /* not HAVE_XDR_READLINKRES */
834 #ifndef HAVE_XDR_READOKRES
836 xdr_readokres(XDR
*xdrs
, nfsreadokres
*objp
)
840 plog(XLOG_DEBUG
, "xdr_readokres:");
843 if (!xdr_fattr(xdrs
, &objp
->raok_attributes
)) {
847 (char **) & objp
->raok_u
.raok_val_u
,
848 (u_int
*) & objp
->raok_u
.raok_len_u
,
854 #endif /* not HAVE_XDR_READOKRES */
857 #ifndef HAVE_XDR_READRES
859 xdr_readres(XDR
*xdrs
, nfsreadres
*objp
)
863 plog(XLOG_DEBUG
, "xdr_readres:");
866 if (!xdr_nfsstat(xdrs
, &objp
->rr_status
)) {
869 switch (objp
->rr_status
) {
871 if (!xdr_readokres(xdrs
, &objp
->rr_u
.rr_reply_u
)) {
880 #endif /* not HAVE_XDR_READRES */
883 #ifndef HAVE_XDR_RENAMEARGS
885 xdr_renameargs(XDR
*xdrs
, nfsrenameargs
*objp
)
889 plog(XLOG_DEBUG
, "xdr_renameargs:");
892 if (!xdr_diropargs(xdrs
, &objp
->rna_from
)) {
895 if (!xdr_diropargs(xdrs
, &objp
->rna_to
)) {
900 #endif /* not HAVE_XDR_RENAMEARGS */
903 #ifndef HAVE_XDR_SATTR
905 xdr_sattr(XDR
*xdrs
, nfssattr
*objp
)
909 plog(XLOG_DEBUG
, "xdr_sattr:");
912 if (!xdr_u_int(xdrs
, &objp
->sa_mode
)) {
915 if (!xdr_u_int(xdrs
, &objp
->sa_uid
)) {
918 if (!xdr_u_int(xdrs
, &objp
->sa_gid
)) {
921 if (!xdr_u_int(xdrs
, &objp
->sa_size
)) {
924 if (!xdr_nfstime(xdrs
, &objp
->sa_atime
)) {
927 if (!xdr_nfstime(xdrs
, &objp
->sa_mtime
)) {
932 #endif /* not HAVE_XDR_SATTR */
935 #ifndef HAVE_XDR_SATTRARGS
937 xdr_sattrargs(XDR
*xdrs
, nfssattrargs
*objp
)
941 plog(XLOG_DEBUG
, "xdr_sattrargs:");
944 if (!xdr_nfs_fh(xdrs
, &objp
->sag_fhandle
)) {
947 if (!xdr_sattr(xdrs
, &objp
->sag_attributes
)) {
952 #endif /* not HAVE_XDR_SATTRARGS */
955 #ifndef HAVE_XDR_STATFSOKRES
957 xdr_statfsokres(XDR
*xdrs
, nfsstatfsokres
*objp
)
961 plog(XLOG_DEBUG
, "xdr_statfsokres:");
964 if (!xdr_u_int(xdrs
, &objp
->sfrok_tsize
)) {
967 if (!xdr_u_int(xdrs
, &objp
->sfrok_bsize
)) {
970 if (!xdr_u_int(xdrs
, &objp
->sfrok_blocks
)) {
973 if (!xdr_u_int(xdrs
, &objp
->sfrok_bfree
)) {
976 if (!xdr_u_int(xdrs
, &objp
->sfrok_bavail
)) {
981 #endif /* not HAVE_XDR_STATFSOKRES */
984 #ifndef HAVE_XDR_STATFSRES
986 xdr_statfsres(XDR
*xdrs
, nfsstatfsres
*objp
)
990 plog(XLOG_DEBUG
, "xdr_statfsres:");
993 if (!xdr_nfsstat(xdrs
, &objp
->sfr_status
)) {
996 switch (objp
->sfr_status
) {
998 if (!xdr_statfsokres(xdrs
, &objp
->sfr_u
.sfr_reply_u
)) {
1007 #endif /* not HAVE_XDR_STATFSRES */
1010 #ifndef HAVE_XDR_SYMLINKARGS
1012 xdr_symlinkargs(XDR
*xdrs
, nfssymlinkargs
*objp
)
1016 plog(XLOG_DEBUG
, "xdr_symlinkargs:");
1019 if (!xdr_diropargs(xdrs
, &objp
->sla_from
)) {
1022 if (!xdr_nfspath(xdrs
, &objp
->sla_to
)) {
1025 if (!xdr_sattr(xdrs
, &objp
->sla_attributes
)) {
1030 #endif /* not HAVE_XDR_SYMLINKARGS */
1033 #ifndef HAVE_XDR_WRITEARGS
1035 xdr_writeargs(XDR
*xdrs
, nfswriteargs
*objp
)
1039 plog(XLOG_DEBUG
, "xdr_writeargs:");
1042 if (!xdr_nfs_fh(xdrs
, &objp
->wra_fhandle
)) {
1045 if (!xdr_u_int(xdrs
, &objp
->wra_beginoffset
)) {
1048 if (!xdr_u_int(xdrs
, &objp
->wra_offset
)) {
1051 if (!xdr_u_int(xdrs
, &objp
->wra_totalcount
)) {
1054 if (!xdr_bytes(xdrs
,
1055 (char **) & objp
->wra_u
.wra_val_u
,
1056 (u_int
*) & objp
->wra_u
.wra_len_u
,
1062 #endif /* not HAVE_XDR_WRITEARGS */
1066 * AUTOFS XDR FUNCTIONS:
1068 #ifdef HAVE_FS_AUTOFS
1069 # ifndef HAVE_XDR_MNTREQUEST
1071 xdr_mntrequest(XDR
*xdrs
, mntrequest
*objp
)
1075 plog(XLOG_DEBUG
, "xdr_mntrequest:");
1078 if (!xdr_string(xdrs
, &objp
->name
, A_MAXNAME
))
1081 if (!xdr_string(xdrs
, &objp
->map
, A_MAXNAME
))
1084 if (!xdr_string(xdrs
, &objp
->opts
, A_MAXOPTS
))
1087 if (!xdr_string(xdrs
, &objp
->path
, A_MAXPATH
))
1092 # endif /* not HAVE_XDR_MNTREQUEST */
1095 # ifndef HAVE_XDR_MNTRES
1097 xdr_mntres(XDR
*xdrs
, mntres
*objp
)
1101 plog(XLOG_DEBUG
, "xdr_mntres:");
1104 if (!xdr_int(xdrs
, &objp
->status
))
1109 # endif /* not HAVE_XDR_MNTRES */
1112 # ifndef HAVE_XDR_UMNTREQUEST
1114 xdr_umntrequest(XDR
*xdrs
, umntrequest
*objp
)
1118 plog(XLOG_DEBUG
, "xdr_umntrequest:");
1121 if (!xdr_int(xdrs
, &objp
->isdirect
))
1124 if (!xdr_u_int(xdrs
, (u_int
*) &objp
->devid
))
1127 #ifdef HAVE_FIELD_UMNTREQUEST_RDEVID
1128 if (!xdr_u_long(xdrs
, &objp
->rdevid
))
1130 #endif /* HAVE_FIELD_UMNTREQUEST_RDEVID */
1132 if (!xdr_pointer(xdrs
, (char **) &objp
->next
, sizeof(umntrequest
), (XDRPROC_T_TYPE
) xdr_umntrequest
))
1137 # endif /* not HAVE_XDR_UMNTREQUEST */
1140 # ifndef HAVE_XDR_UMNTRES
1142 xdr_umntres(XDR
*xdrs
, umntres
*objp
)
1146 plog(XLOG_DEBUG
, "xdr_mntres:");
1149 if (!xdr_int(xdrs
, &objp
->status
))
1154 # endif /* not HAVE_XDR_UMNTRES */
1155 #endif /* HAVE_FS_AUTOFS */