2 * Copyright (c) 1997-2006 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
40 * File: am-utils/libamu/xdr_func.c
45 * Complete list of all possible xdr functions which may be needed.
49 #endif /* HAVE_CONFIG_H */
53 #ifdef __RPCSVC_MOUNT_H__
54 # error IRIX6 should not include rpcsvc/mount.h
55 #endif /* __RPCSVC_MOUNT_H__ */
61 # ifndef AUTOFS_MAXCOMPONENTLEN
62 # define AUTOFS_MAXCOMPONENTLEN 255
63 # endif /* not AUTOFS_MAXCOMPONENTLEN */
64 # ifndef AUTOFS_MAXOPTSLEN
65 # define AUTOFS_MAXOPTSLEN 255
66 # endif /* not AUTOFS_MAXOPTSLEN */
67 # ifndef AUTOFS_MAXPATHLEN
68 # define AUTOFS_MAXPATHLEN 1024
69 # endif /* not AUTOFS_MAXPATHLEN */
70 #endif /* HAVE_FS_AUTOFS */
72 /* forward definitions, are they needed? */
73 extern bool_t xdr_exportnode(XDR *xdrs, exportnode *objp);
74 extern bool_t xdr_groupnode(XDR *xdrs, groupnode *objp);
75 extern bool_t xdr_name(XDR *xdrs, name *objp);
78 #ifndef HAVE_XDR_ATTRSTAT
80 xdr_attrstat(XDR *xdrs, nfsattrstat *objp)
82 if (amuDebug(D_XDRTRACE))
83 plog(XLOG_DEBUG, "xdr_attrstat:");
85 if (!xdr_nfsstat(xdrs, &objp->ns_status)) {
88 switch (objp->ns_status) {
90 if (!xdr_fattr(xdrs, &objp->ns_u.ns_attr_u)) {
99 #endif /* not HAVE_XDR_ATTRSTAT */
102 #ifndef HAVE_XDR_CREATEARGS
104 xdr_createargs(XDR *xdrs, nfscreateargs *objp)
106 if (amuDebug(D_XDRTRACE))
107 plog(XLOG_DEBUG, "xdr_createargs:");
109 if (!xdr_diropargs(xdrs, &objp->ca_where)) {
112 if (!xdr_sattr(xdrs, &objp->ca_attributes)) {
117 #endif /* not HAVE_XDR_CREATEARGS */
120 #ifndef HAVE_XDR_DIRLIST
122 xdr_dirlist(XDR *xdrs, nfsdirlist *objp)
124 if (amuDebug(D_XDRTRACE))
125 plog(XLOG_DEBUG, "xdr_dirlist:");
127 if (!xdr_pointer(xdrs, (char **) &objp->dl_entries, sizeof(nfsentry), (XDRPROC_T_TYPE) xdr_entry)) {
130 if (!xdr_bool(xdrs, &objp->dl_eof)) {
135 #endif /* not HAVE_XDR_DIRLIST */
138 #ifndef HAVE_XDR_DIROPARGS
140 xdr_diropargs(XDR *xdrs, nfsdiropargs *objp)
142 if (amuDebug(D_XDRTRACE))
143 plog(XLOG_DEBUG, "xdr_diropargs:");
145 if (!xdr_nfs_fh(xdrs, &objp->da_fhandle)) {
148 if (!xdr_filename(xdrs, &objp->da_name)) {
153 #endif /* not HAVE_XDR_DIROPARGS */
156 #ifndef HAVE_XDR_DIROPOKRES
158 xdr_diropokres(XDR *xdrs, nfsdiropokres *objp)
160 if (amuDebug(D_XDRTRACE))
161 plog(XLOG_DEBUG, "xdr_diropokres:");
163 if (!xdr_nfs_fh(xdrs, &objp->drok_fhandle)) {
166 if (!xdr_fattr(xdrs, &objp->drok_attributes)) {
171 #endif /* not HAVE_XDR_DIROPOKRES */
174 #ifndef HAVE_XDR_DIROPRES
176 xdr_diropres(XDR *xdrs, nfsdiropres *objp)
178 if (amuDebug(D_XDRTRACE))
179 plog(XLOG_DEBUG, "xdr_diropres:");
181 if (!xdr_nfsstat(xdrs, &objp->dr_status)) {
184 switch (objp->dr_status) {
186 if (!xdr_diropokres(xdrs, &objp->dr_u.dr_drok_u)) {
195 #endif /* not HAVE_XDR_DIROPRES */
198 #ifndef HAVE_XDR_DIRPATH
200 xdr_dirpath(XDR *xdrs, dirpath *objp)
202 if (amuDebug(D_XDRTRACE))
203 plog(XLOG_DEBUG, "xdr_dirpath:");
205 if (!xdr_string(xdrs, objp, MNTPATHLEN)) {
210 #endif /* not HAVE_XDR_DIRPATH */
213 #ifndef HAVE_XDR_ENTRY
215 xdr_entry(XDR *xdrs, nfsentry *objp)
217 if (amuDebug(D_XDRTRACE))
218 plog(XLOG_DEBUG, "xdr_entry:");
220 if (!xdr_u_int(xdrs, &objp->ne_fileid)) {
223 if (!xdr_filename(xdrs, &objp->ne_name)) {
226 if (!xdr_nfscookie(xdrs, objp->ne_cookie)) {
229 if (!xdr_pointer(xdrs, (char **) &objp->ne_nextentry, sizeof(nfsentry), (XDRPROC_T_TYPE) xdr_entry)) {
234 #endif /* not HAVE_XDR_ENTRY */
237 #ifndef HAVE_XDR_EXPORTNODE
239 xdr_exportnode(XDR *xdrs, exportnode *objp)
241 if (amuDebug(D_XDRTRACE))
242 plog(XLOG_DEBUG, "xdr_exportnode:");
244 if (!xdr_dirpath(xdrs, &objp->ex_dir)) {
247 if (!xdr_groups(xdrs, &objp->ex_groups)) {
250 if (!xdr_exports(xdrs, &objp->ex_next)) {
255 #endif /* not HAVE_XDR_EXPORTNODE */
258 #ifndef HAVE_XDR_EXPORTS
260 xdr_exports(XDR *xdrs, exports *objp)
262 if (amuDebug(D_XDRTRACE))
263 plog(XLOG_DEBUG, "xdr_exports:");
265 if (!xdr_pointer(xdrs, (char **) objp, sizeof(exportnode), (XDRPROC_T_TYPE) xdr_exportnode)) {
270 #endif /* not HAVE_XDR_EXPORTS */
273 #ifndef HAVE_XDR_FATTR
275 xdr_fattr(XDR *xdrs, nfsfattr *objp)
277 if (amuDebug(D_XDRTRACE))
278 plog(XLOG_DEBUG, "xdr_fattr:");
280 if (!xdr_ftype(xdrs, &objp->na_type)) {
283 if (!xdr_u_int(xdrs, &objp->na_mode)) {
286 if (!xdr_u_int(xdrs, &objp->na_nlink)) {
289 if (!xdr_u_int(xdrs, &objp->na_uid)) {
292 if (!xdr_u_int(xdrs, &objp->na_gid)) {
295 if (!xdr_u_int(xdrs, &objp->na_size)) {
298 if (!xdr_u_int(xdrs, &objp->na_blocksize)) {
301 if (!xdr_u_int(xdrs, &objp->na_rdev)) {
304 if (!xdr_u_int(xdrs, &objp->na_blocks)) {
307 if (!xdr_u_int(xdrs, &objp->na_fsid)) {
310 if (!xdr_u_int(xdrs, &objp->na_fileid)) {
313 if (!xdr_nfstime(xdrs, &objp->na_atime)) {
316 if (!xdr_nfstime(xdrs, &objp->na_mtime)) {
319 if (!xdr_nfstime(xdrs, &objp->na_ctime)) {
324 #endif /* not HAVE_XDR_FATTR */
327 #ifndef HAVE_XDR_FHANDLE
329 xdr_fhandle(XDR *xdrs, fhandle objp)
331 if (amuDebug(D_XDRTRACE))
332 plog(XLOG_DEBUG, "xdr_fhandle:");
334 if (!xdr_opaque(xdrs, objp, NFS_FHSIZE)) {
339 #endif /* not HAVE_XDR_FHANDLE */
342 #ifndef HAVE_XDR_FHSTATUS
344 xdr_fhstatus(XDR *xdrs, fhstatus *objp)
346 if (amuDebug(D_XDRTRACE))
347 plog(XLOG_DEBUG, "xdr_fhstatus:");
349 if (!xdr_u_int(xdrs, &objp->fhs_status)) {
352 if (objp->fhs_status == 0 && !xdr_fhandle(xdrs, objp->fhs_fh)) {
357 #endif /* not HAVE_XDR_FHSTATUS */
360 #ifndef HAVE_XDR_FILENAME
362 xdr_filename(XDR *xdrs, filename *objp)
364 if (amuDebug(D_XDRTRACE))
365 plog(XLOG_DEBUG, "xdr_filename:");
367 if (!xdr_string(xdrs, objp, NFS_MAXNAMLEN)) {
372 #endif /* not HAVE_XDR_FILENAME */
375 #ifndef HAVE_XDR_FTYPE
377 xdr_ftype(XDR *xdrs, nfsftype *objp)
379 enum_t local_obj = *objp;
381 if (amuDebug(D_XDRTRACE))
382 plog(XLOG_DEBUG, "xdr_ftype:");
384 if (!xdr_enum(xdrs, &local_obj)) {
389 #endif /* not HAVE_XDR_FTYPE */
392 #ifndef HAVE_XDR_GROUPNODE
394 xdr_groupnode(XDR *xdrs, groupnode *objp)
396 if (amuDebug(D_XDRTRACE))
397 plog(XLOG_DEBUG, "xdr_groupnode:");
399 if (!xdr_name(xdrs, &objp->gr_name)) {
402 if (!xdr_groups(xdrs, &objp->gr_next)) {
407 #endif /* not HAVE_XDR_GROUPNODE */
410 #ifndef HAVE_XDR_GROUPS
412 xdr_groups(XDR *xdrs, groups *objp)
414 if (amuDebug(D_XDRTRACE))
415 plog(XLOG_DEBUG, "xdr_groups:");
417 if (!xdr_pointer(xdrs, (char **) objp, sizeof(groupnode), (XDRPROC_T_TYPE) xdr_groupnode)) {
422 #endif /* not HAVE_XDR_GROUPS */
425 #ifndef HAVE_XDR_LINKARGS
427 xdr_linkargs(XDR *xdrs, nfslinkargs *objp)
429 if (amuDebug(D_XDRTRACE))
430 plog(XLOG_DEBUG, "xdr_linkargs:");
432 if (!xdr_nfs_fh(xdrs, &objp->la_fhandle)) {
435 if (!xdr_diropargs(xdrs, &objp->la_to)) {
440 #endif /* not HAVE_XDR_LINKARGS */
443 #ifndef HAVE_XDR_MOUNTBODY
445 xdr_mountbody(XDR *xdrs, mountbody *objp)
447 if (amuDebug(D_XDRTRACE))
448 plog(XLOG_DEBUG, "xdr_mountbody:");
450 if (!xdr_name(xdrs, &objp->ml_hostname)) {
453 if (!xdr_dirpath(xdrs, &objp->ml_directory)) {
456 if (!xdr_mountlist(xdrs, &objp->ml_next)) {
461 #endif /* not HAVE_XDR_MOUNTBODY */
464 #ifndef HAVE_XDR_MOUNTLIST
466 xdr_mountlist(XDR *xdrs, mountlist *objp)
468 if (amuDebug(D_XDRTRACE))
469 plog(XLOG_DEBUG, "xdr_mountlist:");
471 if (!xdr_pointer(xdrs, (char **) objp, sizeof(mountbody), (XDRPROC_T_TYPE) xdr_mountbody)) {
476 #endif /* not HAVE_XDR_MOUNTLIST */
479 #ifndef HAVE_XDR_NAME
481 xdr_name(XDR *xdrs, name *objp)
483 if (amuDebug(D_XDRTRACE))
484 plog(XLOG_DEBUG, "xdr_name:");
486 if (!xdr_string(xdrs, objp, MNTNAMLEN)) {
491 #endif /* not HAVE_XDR_NAME */
494 #ifndef HAVE_XDR_NFS_FH
496 xdr_nfs_fh(XDR *xdrs, am_nfs_fh *objp)
498 if (amuDebug(D_XDRTRACE))
499 plog(XLOG_DEBUG, "xdr_nfs_fh:");
501 if (!xdr_opaque(xdrs, (caddr_t) objp->fh_data, NFS_FHSIZE)) {
506 #endif /* not HAVE_XDR_NFS_FH */
509 #ifndef HAVE_XDR_NFSCOOKIE
511 xdr_nfscookie(XDR *xdrs, nfscookie objp)
513 if (amuDebug(D_XDRTRACE))
514 plog(XLOG_DEBUG, "xdr_nfscookie:");
516 if (!xdr_opaque(xdrs, objp, NFS_COOKIESIZE)) {
521 #endif /* not HAVE_XDR_NFSCOOKIE */
524 #ifndef HAVE_XDR_NFSPATH
526 xdr_nfspath(XDR *xdrs, nfspath *objp)
528 if (amuDebug(D_XDRTRACE))
529 plog(XLOG_DEBUG, "xdr_nfspath:");
531 if (!xdr_string(xdrs, objp, NFS_MAXPATHLEN)) {
536 #endif /* not HAVE_XDR_NFSPATH */
539 #ifndef HAVE_XDR_NFSSTAT
541 xdr_nfsstat(XDR *xdrs, nfsstat *objp)
543 enum_t local_obj = *objp;
545 if (amuDebug(D_XDRTRACE))
546 plog(XLOG_DEBUG, "xdr_nfsstat:");
548 if (!xdr_enum(xdrs, &local_obj)) {
553 #endif /* not HAVE_XDR_NFSSTAT */
556 #ifndef HAVE_XDR_NFSTIME
558 xdr_nfstime(XDR *xdrs, nfstime *objp)
560 if (amuDebug(D_XDRTRACE))
561 plog(XLOG_DEBUG, "xdr_nfstime:");
563 if (!xdr_u_int(xdrs, (u_int *) &objp->nt_seconds)) {
566 if (!xdr_u_int(xdrs, (u_int *) &objp->nt_useconds)) {
571 #endif /* not HAVE_XDR_NFSTIME */
574 #ifndef HAVE_XDR_POINTER
576 xdr_pointer(register XDR *xdrs, char **objpp, u_int obj_size, XDRPROC_T_TYPE xdr_obj)
578 if (amuDebug(D_XDRTRACE))
579 plog(XLOG_DEBUG, "xdr_pointer:");
583 more_data = (*objpp != NULL);
584 if (!xdr_bool(xdrs, &more_data)) {
592 return (xdr_reference(xdrs, objpp, obj_size, xdr_obj));
594 #endif /* not HAVE_XDR_POINTER */
597 #ifndef HAVE_XDR_READARGS
599 xdr_readargs(XDR *xdrs, nfsreadargs *objp)
601 if (amuDebug(D_XDRTRACE))
602 plog(XLOG_DEBUG, "xdr_readargs:");
604 if (!xdr_nfs_fh(xdrs, &objp->ra_fhandle)) {
607 if (!xdr_u_int(xdrs, &objp->ra_offset)) {
610 if (!xdr_u_int(xdrs, &objp->ra_count)) {
613 if (!xdr_u_int(xdrs, &objp->ra_totalcount)) {
618 #endif /* not HAVE_XDR_READARGS */
621 #ifndef HAVE_XDR_READDIRARGS
623 xdr_readdirargs(XDR *xdrs, nfsreaddirargs *objp)
625 if (amuDebug(D_XDRTRACE))
626 plog(XLOG_DEBUG, "xdr_readdirargs:");
628 if (!xdr_nfs_fh(xdrs, &objp->rda_fhandle)) {
631 if (!xdr_nfscookie(xdrs, objp->rda_cookie)) {
634 if (!xdr_u_int(xdrs, &objp->rda_count)) {
639 #endif /* not HAVE_XDR_READDIRARGS */
642 #ifndef HAVE_XDR_READDIRRES
644 xdr_readdirres(XDR *xdrs, nfsreaddirres *objp)
646 if (amuDebug(D_XDRTRACE))
647 plog(XLOG_DEBUG, "xdr_readdirres:");
649 if (!xdr_nfsstat(xdrs, &objp->rdr_status)) {
652 switch (objp->rdr_status) {
654 if (!xdr_dirlist(xdrs, &objp->rdr_u.rdr_reply_u)) {
663 #endif /* not HAVE_XDR_READDIRRES */
666 #ifndef HAVE_XDR_READLINKRES
668 xdr_readlinkres(XDR *xdrs, nfsreadlinkres *objp)
670 if (amuDebug(D_XDRTRACE))
671 plog(XLOG_DEBUG, "xdr_readlinkres:");
673 if (!xdr_nfsstat(xdrs, &objp->rlr_status)) {
676 switch (objp->rlr_status) {
678 if (!xdr_nfspath(xdrs, &objp->rlr_u.rlr_data_u)) {
687 #endif /* not HAVE_XDR_READLINKRES */
690 #ifndef HAVE_XDR_READOKRES
692 xdr_readokres(XDR *xdrs, nfsreadokres *objp)
694 if (amuDebug(D_XDRTRACE))
695 plog(XLOG_DEBUG, "xdr_readokres:");
697 if (!xdr_fattr(xdrs, &objp->raok_attributes)) {
701 (char **) & objp->raok_u.raok_val_u,
702 (u_int *) & objp->raok_u.raok_len_u,
708 #endif /* not HAVE_XDR_READOKRES */
711 #ifndef HAVE_XDR_READRES
713 xdr_readres(XDR *xdrs, nfsreadres *objp)
715 if (amuDebug(D_XDRTRACE))
716 plog(XLOG_DEBUG, "xdr_readres:");
718 if (!xdr_nfsstat(xdrs, &objp->rr_status)) {
721 switch (objp->rr_status) {
723 if (!xdr_readokres(xdrs, &objp->rr_u.rr_reply_u)) {
732 #endif /* not HAVE_XDR_READRES */
735 #ifndef HAVE_XDR_RENAMEARGS
737 xdr_renameargs(XDR *xdrs, nfsrenameargs *objp)
739 if (amuDebug(D_XDRTRACE))
740 plog(XLOG_DEBUG, "xdr_renameargs:");
742 if (!xdr_diropargs(xdrs, &objp->rna_from)) {
745 if (!xdr_diropargs(xdrs, &objp->rna_to)) {
750 #endif /* not HAVE_XDR_RENAMEARGS */
753 #ifndef HAVE_XDR_SATTR
755 xdr_sattr(XDR *xdrs, nfssattr *objp)
757 if (amuDebug(D_XDRTRACE))
758 plog(XLOG_DEBUG, "xdr_sattr:");
760 if (!xdr_u_int(xdrs, &objp->sa_mode)) {
763 if (!xdr_u_int(xdrs, &objp->sa_uid)) {
766 if (!xdr_u_int(xdrs, &objp->sa_gid)) {
769 if (!xdr_u_int(xdrs, &objp->sa_size)) {
772 if (!xdr_nfstime(xdrs, &objp->sa_atime)) {
775 if (!xdr_nfstime(xdrs, &objp->sa_mtime)) {
780 #endif /* not HAVE_XDR_SATTR */
783 #ifndef HAVE_XDR_SATTRARGS
785 xdr_sattrargs(XDR *xdrs, nfssattrargs *objp)
787 if (amuDebug(D_XDRTRACE))
788 plog(XLOG_DEBUG, "xdr_sattrargs:");
790 if (!xdr_nfs_fh(xdrs, &objp->sag_fhandle)) {
793 if (!xdr_sattr(xdrs, &objp->sag_attributes)) {
798 #endif /* not HAVE_XDR_SATTRARGS */
801 #ifndef HAVE_XDR_STATFSOKRES
803 xdr_statfsokres(XDR *xdrs, nfsstatfsokres *objp)
805 if (amuDebug(D_XDRTRACE))
806 plog(XLOG_DEBUG, "xdr_statfsokres:");
808 if (!xdr_u_int(xdrs, &objp->sfrok_tsize)) {
811 if (!xdr_u_int(xdrs, &objp->sfrok_bsize)) {
814 if (!xdr_u_int(xdrs, &objp->sfrok_blocks)) {
817 if (!xdr_u_int(xdrs, &objp->sfrok_bfree)) {
820 if (!xdr_u_int(xdrs, &objp->sfrok_bavail)) {
825 #endif /* not HAVE_XDR_STATFSOKRES */
828 #ifndef HAVE_XDR_STATFSRES
830 xdr_statfsres(XDR *xdrs, nfsstatfsres *objp)
832 if (amuDebug(D_XDRTRACE))
833 plog(XLOG_DEBUG, "xdr_statfsres:");
835 if (!xdr_nfsstat(xdrs, &objp->sfr_status)) {
838 switch (objp->sfr_status) {
840 if (!xdr_statfsokres(xdrs, &objp->sfr_u.sfr_reply_u)) {
849 #endif /* not HAVE_XDR_STATFSRES */
852 #ifndef HAVE_XDR_SYMLINKARGS
854 xdr_symlinkargs(XDR *xdrs, nfssymlinkargs *objp)
856 if (amuDebug(D_XDRTRACE))
857 plog(XLOG_DEBUG, "xdr_symlinkargs:");
859 if (!xdr_diropargs(xdrs, &objp->sla_from)) {
862 if (!xdr_nfspath(xdrs, &objp->sla_to)) {
865 if (!xdr_sattr(xdrs, &objp->sla_attributes)) {
870 #endif /* not HAVE_XDR_SYMLINKARGS */
873 #ifndef HAVE_XDR_WRITEARGS
875 xdr_writeargs(XDR *xdrs, nfswriteargs *objp)
877 if (amuDebug(D_XDRTRACE))
878 plog(XLOG_DEBUG, "xdr_writeargs:");
880 if (!xdr_nfs_fh(xdrs, &objp->wra_fhandle)) {
883 if (!xdr_u_int(xdrs, &objp->wra_beginoffset)) {
886 if (!xdr_u_int(xdrs, &objp->wra_offset)) {
889 if (!xdr_u_int(xdrs, &objp->wra_totalcount)) {
893 (char **) & objp->wra_u.wra_val_u,
894 (u_int *) & objp->wra_u.wra_len_u,
900 #endif /* not HAVE_XDR_WRITEARGS */
904 * NFS V3 XDR FUNCTIONS:
908 xdr_am_fhandle3(XDR *xdrs, am_fhandle3 *objp)
910 if (amuDebug(D_XDRTRACE))
911 plog(XLOG_DEBUG, "xdr_am_fhandle3:");
914 (char **) &objp->fhandle3_val,
915 (u_int *) &objp->fhandle3_len,
923 xdr_am_mountstat3(XDR *xdrs, am_mountstat3 *objp)
925 enum_t local_obj = *objp;
927 if (amuDebug(D_XDRTRACE))
928 plog(XLOG_DEBUG, "xdr_am_mountstat3:");
930 if (!xdr_enum(xdrs, &local_obj))
937 xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp)
939 if (amuDebug(D_XDRTRACE))
940 plog(XLOG_DEBUG, "xdr_am_mountres3_ok:");
942 if (!xdr_am_fhandle3(xdrs, &objp->fhandle))
945 (char **) ((voidp) &objp->auth_flavors.auth_flavors_val),
946 (u_int *) &objp->auth_flavors.auth_flavors_len,
949 (XDRPROC_T_TYPE) xdr_int))
956 xdr_am_mountres3(XDR *xdrs, am_mountres3 *objp)
958 if (amuDebug(D_XDRTRACE))
959 plog(XLOG_DEBUG, "xdr_am_mountres3:");
961 if (!xdr_am_mountstat3(xdrs, &objp->fhs_status))
964 if (objp->fhs_status == AM_MNT3_OK) {
965 if (!xdr_am_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo))
973 xdr_am_diropargs3(XDR *xdrs, am_diropargs3 *objp)
975 if (amuDebug(D_XDRTRACE))
976 plog(XLOG_DEBUG, "xdr_am_diropargs3:");
978 if (!xdr_am_nfs_fh3(xdrs, &objp->dir))
980 if (!xdr_am_filename3(xdrs, &objp->name))
987 xdr_am_filename3(XDR *xdrs, am_filename3 *objp)
989 if (amuDebug(D_XDRTRACE))
990 plog(XLOG_DEBUG, "xdr_am_filename3:");
992 if (!xdr_string(xdrs, objp, ~0))
999 xdr_am_LOOKUP3args(XDR *xdrs, am_LOOKUP3args *objp)
1001 if (amuDebug(D_XDRTRACE))
1002 plog(XLOG_DEBUG, "xdr_am_LOOKUP3args:");
1004 if (!xdr_am_diropargs3(xdrs, &objp->what))
1011 xdr_am_LOOKUP3res(XDR *xdrs, am_LOOKUP3res *objp)
1013 if (amuDebug(D_XDRTRACE))
1014 plog(XLOG_DEBUG, "xdr_am_LOOKUP3res:");
1016 if (!xdr_am_nfsstat3(xdrs, &objp->status))
1018 switch (objp->status) {
1020 if (!xdr_am_LOOKUP3resok(xdrs, &objp->res_u.ok))
1024 if (!xdr_am_LOOKUP3resfail(xdrs, &objp->res_u.fail))
1033 xdr_am_LOOKUP3resfail(XDR *xdrs, am_LOOKUP3resfail *objp)
1035 if (amuDebug(D_XDRTRACE))
1036 plog(XLOG_DEBUG, "xdr_am_LOOKUP3resfail:");
1039 * Don't xdr post_op_attr: amd doesn't need them, but they require many
1040 * additional xdr functions.
1043 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
1051 xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp)
1053 if (amuDebug(D_XDRTRACE))
1054 plog(XLOG_DEBUG, "xdr_am_LOOKUP3resok:");
1056 if (!xdr_am_nfs_fh3(xdrs, &objp->object))
1059 * Don't xdr post_op_attr: amd doesn't need them, but they require many
1060 * additional xdr functions.
1063 if (!xdr_post_op_attr(xdrs, &objp->obj_attributes))
1065 if (!xdr_post_op_attr(xdrs, &objp->dir_attributes))
1073 xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp)
1075 if (amuDebug(D_XDRTRACE))
1076 plog(XLOG_DEBUG, "xdr_am_nfs_fh3:");
1078 if (!xdr_u_int(xdrs, &objp->am_fh3_length))
1080 if (objp->am_fh3_length > AM_FHSIZE3)
1082 if (!xdr_opaque(xdrs, objp->am_fh3_data, objp->am_fh3_length))
1089 xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp)
1091 if (amuDebug(D_XDRTRACE))
1092 plog(XLOG_DEBUG, "xdr_am_nfsstat3:");
1094 if (!xdr_enum(xdrs, (enum_t *)objp))
1098 #endif /* not HAVE_FS_NFS3 */