File indexing completed on 2024-04-21 04:57:40

0001 /*
0002  * Please do not edit this file.
0003  * It was generated using rpcgen.
0004  */
0005 
0006 #include "rpc_nfs2_prot.h"
0007 /*
0008  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
0009  * unrestricted use provided that this legend is included on all tape
0010  * media and as a part of the software program in whole or part.  Users
0011  * may copy or modify Sun RPC without charge, but are not authorized
0012  * to license or distribute it to anyone else except as part of a product or
0013  * program developed by the user or with the express written consent of
0014  * Sun Microsystems, Inc.
0015  *
0016  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
0017  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
0018  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
0019  *
0020  * Sun RPC is provided with no support and without any obligation on the
0021  * part of Sun Microsystems, Inc. to assist in its use, correction,
0022  * modification or enhancement.
0023  *
0024  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
0025  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
0026  * OR ANY PART THEREOF.
0027  *
0028  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
0029  * or profits or other special, indirect and consequential damages, even if
0030  * Sun has been advised of the possibility of such damages.
0031  *
0032  * Sun Microsystems, Inc.
0033  * 2550 Garcia Avenue
0034  * Mountain View, California  94043
0035  */
0036 /*
0037  * SPDX-FileCopyrightText: 1987, 1990 Sun Microsystems Inc.
0038  */
0039 
0040 /* from @(#)nfs_prot.x  1.3 91/03/11 TIRPC 1.0 */
0041 
0042 bool_t
0043 xdr_nfsstat (XDR *xdrs, nfsstat *objp)
0044 {
0045     register int32_t *buf;
0046 
0047      if (!xdr_enum (xdrs, (enum_t *) objp))
0048          return FALSE;
0049     return TRUE;
0050 }
0051 
0052 bool_t
0053 xdr_ftype (XDR *xdrs, ftype *objp)
0054 {
0055     register int32_t *buf;
0056 
0057      if (!xdr_enum (xdrs, (enum_t *) objp))
0058          return FALSE;
0059     return TRUE;
0060 }
0061 
0062 bool_t
0063 xdr_nfs_fh (XDR *xdrs, nfs_fh *objp)
0064 {
0065     register int32_t *buf;
0066 
0067     int i;
0068      if (!xdr_opaque (xdrs, objp->data, NFS_FHSIZE))
0069          return FALSE;
0070     return TRUE;
0071 }
0072 
0073 bool_t
0074 xdr_nfstime (XDR *xdrs, nfstime *objp)
0075 {
0076     register int32_t *buf;
0077 
0078      if (!xdr_u_int (xdrs, &objp->seconds))
0079          return FALSE;
0080      if (!xdr_u_int (xdrs, &objp->useconds))
0081          return FALSE;
0082     return TRUE;
0083 }
0084 
0085 bool_t
0086 xdr_fattr (XDR *xdrs, fattr *objp)
0087 {
0088     register int32_t *buf;
0089 
0090 
0091     if (xdrs->x_op == XDR_ENCODE) {
0092          if (!xdr_ftype (xdrs, &objp->type))
0093              return FALSE;
0094         buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT);
0095         if (buf == NULL) {
0096              if (!xdr_u_int (xdrs, &objp->mode))
0097                  return FALSE;
0098              if (!xdr_u_int (xdrs, &objp->nlink))
0099                  return FALSE;
0100              if (!xdr_u_int (xdrs, &objp->uid))
0101                  return FALSE;
0102              if (!xdr_u_int (xdrs, &objp->gid))
0103                  return FALSE;
0104              if (!xdr_u_int (xdrs, &objp->size))
0105                  return FALSE;
0106              if (!xdr_u_int (xdrs, &objp->blocksize))
0107                  return FALSE;
0108              if (!xdr_u_int (xdrs, &objp->rdev))
0109                  return FALSE;
0110              if (!xdr_u_int (xdrs, &objp->blocks))
0111                  return FALSE;
0112              if (!xdr_u_int (xdrs, &objp->fsid))
0113                  return FALSE;
0114              if (!xdr_u_int (xdrs, &objp->fileid))
0115                  return FALSE;
0116 
0117         } else {
0118         IXDR_PUT_U_LONG(buf, objp->mode);
0119         IXDR_PUT_U_LONG(buf, objp->nlink);
0120         IXDR_PUT_U_LONG(buf, objp->uid);
0121         IXDR_PUT_U_LONG(buf, objp->gid);
0122         IXDR_PUT_U_LONG(buf, objp->size);
0123         IXDR_PUT_U_LONG(buf, objp->blocksize);
0124         IXDR_PUT_U_LONG(buf, objp->rdev);
0125         IXDR_PUT_U_LONG(buf, objp->blocks);
0126         IXDR_PUT_U_LONG(buf, objp->fsid);
0127         IXDR_PUT_U_LONG(buf, objp->fileid);
0128         }
0129          if (!xdr_nfstime (xdrs, &objp->atime))
0130              return FALSE;
0131          if (!xdr_nfstime (xdrs, &objp->mtime))
0132              return FALSE;
0133          if (!xdr_nfstime (xdrs, &objp->ctime))
0134              return FALSE;
0135         return TRUE;
0136     } else if (xdrs->x_op == XDR_DECODE) {
0137          if (!xdr_ftype (xdrs, &objp->type))
0138              return FALSE;
0139         buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT);
0140         if (buf == NULL) {
0141              if (!xdr_u_int (xdrs, &objp->mode))
0142                  return FALSE;
0143              if (!xdr_u_int (xdrs, &objp->nlink))
0144                  return FALSE;
0145              if (!xdr_u_int (xdrs, &objp->uid))
0146                  return FALSE;
0147              if (!xdr_u_int (xdrs, &objp->gid))
0148                  return FALSE;
0149              if (!xdr_u_int (xdrs, &objp->size))
0150                  return FALSE;
0151              if (!xdr_u_int (xdrs, &objp->blocksize))
0152                  return FALSE;
0153              if (!xdr_u_int (xdrs, &objp->rdev))
0154                  return FALSE;
0155              if (!xdr_u_int (xdrs, &objp->blocks))
0156                  return FALSE;
0157              if (!xdr_u_int (xdrs, &objp->fsid))
0158                  return FALSE;
0159              if (!xdr_u_int (xdrs, &objp->fileid))
0160                  return FALSE;
0161 
0162         } else {
0163         objp->mode = IXDR_GET_U_LONG(buf);
0164         objp->nlink = IXDR_GET_U_LONG(buf);
0165         objp->uid = IXDR_GET_U_LONG(buf);
0166         objp->gid = IXDR_GET_U_LONG(buf);
0167         objp->size = IXDR_GET_U_LONG(buf);
0168         objp->blocksize = IXDR_GET_U_LONG(buf);
0169         objp->rdev = IXDR_GET_U_LONG(buf);
0170         objp->blocks = IXDR_GET_U_LONG(buf);
0171         objp->fsid = IXDR_GET_U_LONG(buf);
0172         objp->fileid = IXDR_GET_U_LONG(buf);
0173         }
0174          if (!xdr_nfstime (xdrs, &objp->atime))
0175              return FALSE;
0176          if (!xdr_nfstime (xdrs, &objp->mtime))
0177              return FALSE;
0178          if (!xdr_nfstime (xdrs, &objp->ctime))
0179              return FALSE;
0180      return TRUE;
0181     }
0182 
0183      if (!xdr_ftype (xdrs, &objp->type))
0184          return FALSE;
0185      if (!xdr_u_int (xdrs, &objp->mode))
0186          return FALSE;
0187      if (!xdr_u_int (xdrs, &objp->nlink))
0188          return FALSE;
0189      if (!xdr_u_int (xdrs, &objp->uid))
0190          return FALSE;
0191      if (!xdr_u_int (xdrs, &objp->gid))
0192          return FALSE;
0193      if (!xdr_u_int (xdrs, &objp->size))
0194          return FALSE;
0195      if (!xdr_u_int (xdrs, &objp->blocksize))
0196          return FALSE;
0197      if (!xdr_u_int (xdrs, &objp->rdev))
0198          return FALSE;
0199      if (!xdr_u_int (xdrs, &objp->blocks))
0200          return FALSE;
0201      if (!xdr_u_int (xdrs, &objp->fsid))
0202          return FALSE;
0203      if (!xdr_u_int (xdrs, &objp->fileid))
0204          return FALSE;
0205      if (!xdr_nfstime (xdrs, &objp->atime))
0206          return FALSE;
0207      if (!xdr_nfstime (xdrs, &objp->mtime))
0208          return FALSE;
0209      if (!xdr_nfstime (xdrs, &objp->ctime))
0210          return FALSE;
0211     return TRUE;
0212 }
0213 
0214 bool_t
0215 xdr_sattr (XDR *xdrs, sattr *objp)
0216 {
0217     register int32_t *buf;
0218 
0219 
0220     if (xdrs->x_op == XDR_ENCODE) {
0221         buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
0222         if (buf == NULL) {
0223              if (!xdr_u_int (xdrs, &objp->mode))
0224                  return FALSE;
0225              if (!xdr_u_int (xdrs, &objp->uid))
0226                  return FALSE;
0227              if (!xdr_u_int (xdrs, &objp->gid))
0228                  return FALSE;
0229              if (!xdr_u_int (xdrs, &objp->size))
0230                  return FALSE;
0231 
0232         } else {
0233         IXDR_PUT_U_LONG(buf, objp->mode);
0234         IXDR_PUT_U_LONG(buf, objp->uid);
0235         IXDR_PUT_U_LONG(buf, objp->gid);
0236         IXDR_PUT_U_LONG(buf, objp->size);
0237         }
0238          if (!xdr_nfstime (xdrs, &objp->atime))
0239              return FALSE;
0240          if (!xdr_nfstime (xdrs, &objp->mtime))
0241              return FALSE;
0242         return TRUE;
0243     } else if (xdrs->x_op == XDR_DECODE) {
0244         buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
0245         if (buf == NULL) {
0246              if (!xdr_u_int (xdrs, &objp->mode))
0247                  return FALSE;
0248              if (!xdr_u_int (xdrs, &objp->uid))
0249                  return FALSE;
0250              if (!xdr_u_int (xdrs, &objp->gid))
0251                  return FALSE;
0252              if (!xdr_u_int (xdrs, &objp->size))
0253                  return FALSE;
0254 
0255         } else {
0256         objp->mode = IXDR_GET_U_LONG(buf);
0257         objp->uid = IXDR_GET_U_LONG(buf);
0258         objp->gid = IXDR_GET_U_LONG(buf);
0259         objp->size = IXDR_GET_U_LONG(buf);
0260         }
0261          if (!xdr_nfstime (xdrs, &objp->atime))
0262              return FALSE;
0263          if (!xdr_nfstime (xdrs, &objp->mtime))
0264              return FALSE;
0265      return TRUE;
0266     }
0267 
0268      if (!xdr_u_int (xdrs, &objp->mode))
0269          return FALSE;
0270      if (!xdr_u_int (xdrs, &objp->uid))
0271          return FALSE;
0272      if (!xdr_u_int (xdrs, &objp->gid))
0273          return FALSE;
0274      if (!xdr_u_int (xdrs, &objp->size))
0275          return FALSE;
0276      if (!xdr_nfstime (xdrs, &objp->atime))
0277          return FALSE;
0278      if (!xdr_nfstime (xdrs, &objp->mtime))
0279          return FALSE;
0280     return TRUE;
0281 }
0282 
0283 bool_t
0284 xdr_filename (XDR *xdrs, filename *objp)
0285 {
0286     register int32_t *buf;
0287 
0288      if (!xdr_string (xdrs, objp, NFS_MAXNAMLEN))
0289          return FALSE;
0290     return TRUE;
0291 }
0292 
0293 bool_t
0294 xdr_nfspath (XDR *xdrs, nfspath *objp)
0295 {
0296     register int32_t *buf;
0297 
0298      if (!xdr_string (xdrs, objp, NFS_MAXPATHLEN))
0299          return FALSE;
0300     return TRUE;
0301 }
0302 
0303 bool_t
0304 xdr_attrstat (XDR *xdrs, attrstat *objp)
0305 {
0306     register int32_t *buf;
0307 
0308      if (!xdr_nfsstat (xdrs, &objp->status))
0309          return FALSE;
0310     switch (objp->status) {
0311     case NFS_OK:
0312          if (!xdr_fattr (xdrs, &objp->attrstat_u.attributes))
0313              return FALSE;
0314         break;
0315     default:
0316         break;
0317     }
0318     return TRUE;
0319 }
0320 
0321 bool_t
0322 xdr_sattrargs (XDR *xdrs, sattrargs *objp)
0323 {
0324     register int32_t *buf;
0325 
0326      if (!xdr_nfs_fh (xdrs, &objp->file))
0327          return FALSE;
0328      if (!xdr_sattr (xdrs, &objp->attributes))
0329          return FALSE;
0330     return TRUE;
0331 }
0332 
0333 bool_t
0334 xdr_diropargs (XDR *xdrs, diropargs *objp)
0335 {
0336     register int32_t *buf;
0337 
0338      if (!xdr_nfs_fh (xdrs, &objp->dir))
0339          return FALSE;
0340      if (!xdr_filename (xdrs, &objp->name))
0341          return FALSE;
0342     return TRUE;
0343 }
0344 
0345 bool_t
0346 xdr_diropokres (XDR *xdrs, diropokres *objp)
0347 {
0348     register int32_t *buf;
0349 
0350      if (!xdr_nfs_fh (xdrs, &objp->file))
0351          return FALSE;
0352      if (!xdr_fattr (xdrs, &objp->attributes))
0353          return FALSE;
0354     return TRUE;
0355 }
0356 
0357 bool_t
0358 xdr_diropres (XDR *xdrs, diropres *objp)
0359 {
0360     register int32_t *buf;
0361 
0362      if (!xdr_nfsstat (xdrs, &objp->status))
0363          return FALSE;
0364     switch (objp->status) {
0365     case NFS_OK:
0366          if (!xdr_diropokres (xdrs, &objp->diropres_u.diropres))
0367              return FALSE;
0368         break;
0369     default:
0370         break;
0371     }
0372     return TRUE;
0373 }
0374 
0375 bool_t
0376 xdr_readlinkres (XDR *xdrs, readlinkres *objp)
0377 {
0378     register int32_t *buf;
0379 
0380      if (!xdr_nfsstat (xdrs, &objp->status))
0381          return FALSE;
0382     switch (objp->status) {
0383     case NFS_OK:
0384          if (!xdr_nfspath (xdrs, &objp->readlinkres_u.data))
0385              return FALSE;
0386         break;
0387     default:
0388         break;
0389     }
0390     return TRUE;
0391 }
0392 
0393 bool_t
0394 xdr_readargs (XDR *xdrs, readargs *objp)
0395 {
0396     register int32_t *buf;
0397 
0398      if (!xdr_nfs_fh (xdrs, &objp->file))
0399          return FALSE;
0400      if (!xdr_u_int (xdrs, &objp->offset))
0401          return FALSE;
0402      if (!xdr_u_int (xdrs, &objp->count))
0403          return FALSE;
0404      if (!xdr_u_int (xdrs, &objp->totalcount))
0405          return FALSE;
0406     return TRUE;
0407 }
0408 
0409 bool_t
0410 xdr_readokres (XDR *xdrs, readokres *objp)
0411 {
0412     register int32_t *buf;
0413 
0414      if (!xdr_fattr (xdrs, &objp->attributes))
0415          return FALSE;
0416      if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
0417          return FALSE;
0418     return TRUE;
0419 }
0420 
0421 bool_t
0422 xdr_readres (XDR *xdrs, readres *objp)
0423 {
0424     register int32_t *buf;
0425 
0426      if (!xdr_nfsstat (xdrs, &objp->status))
0427          return FALSE;
0428     switch (objp->status) {
0429     case NFS_OK:
0430          if (!xdr_readokres (xdrs, &objp->readres_u.reply))
0431              return FALSE;
0432         break;
0433     default:
0434         break;
0435     }
0436     return TRUE;
0437 }
0438 
0439 bool_t
0440 xdr_writeargs (XDR *xdrs, writeargs *objp)
0441 {
0442     register int32_t *buf;
0443 
0444 
0445     if (xdrs->x_op == XDR_ENCODE) {
0446          if (!xdr_nfs_fh (xdrs, &objp->file))
0447              return FALSE;
0448         buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
0449         if (buf == NULL) {
0450              if (!xdr_u_int (xdrs, &objp->beginoffset))
0451                  return FALSE;
0452              if (!xdr_u_int (xdrs, &objp->offset))
0453                  return FALSE;
0454              if (!xdr_u_int (xdrs, &objp->totalcount))
0455                  return FALSE;
0456 
0457         } else {
0458         IXDR_PUT_U_LONG(buf, objp->beginoffset);
0459         IXDR_PUT_U_LONG(buf, objp->offset);
0460         IXDR_PUT_U_LONG(buf, objp->totalcount);
0461         }
0462          if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
0463              return FALSE;
0464         return TRUE;
0465     } else if (xdrs->x_op == XDR_DECODE) {
0466          if (!xdr_nfs_fh (xdrs, &objp->file))
0467              return FALSE;
0468         buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
0469         if (buf == NULL) {
0470              if (!xdr_u_int (xdrs, &objp->beginoffset))
0471                  return FALSE;
0472              if (!xdr_u_int (xdrs, &objp->offset))
0473                  return FALSE;
0474              if (!xdr_u_int (xdrs, &objp->totalcount))
0475                  return FALSE;
0476 
0477         } else {
0478         objp->beginoffset = IXDR_GET_U_LONG(buf);
0479         objp->offset = IXDR_GET_U_LONG(buf);
0480         objp->totalcount = IXDR_GET_U_LONG(buf);
0481         }
0482          if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
0483              return FALSE;
0484      return TRUE;
0485     }
0486 
0487      if (!xdr_nfs_fh (xdrs, &objp->file))
0488          return FALSE;
0489      if (!xdr_u_int (xdrs, &objp->beginoffset))
0490          return FALSE;
0491      if (!xdr_u_int (xdrs, &objp->offset))
0492          return FALSE;
0493      if (!xdr_u_int (xdrs, &objp->totalcount))
0494          return FALSE;
0495      if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
0496          return FALSE;
0497     return TRUE;
0498 }
0499 
0500 bool_t
0501 xdr_createargs (XDR *xdrs, createargs *objp)
0502 {
0503     register int32_t *buf;
0504 
0505      if (!xdr_diropargs (xdrs, &objp->where))
0506          return FALSE;
0507      if (!xdr_sattr (xdrs, &objp->attributes))
0508          return FALSE;
0509     return TRUE;
0510 }
0511 
0512 bool_t
0513 xdr_renameargs (XDR *xdrs, renameargs *objp)
0514 {
0515     register int32_t *buf;
0516 
0517      if (!xdr_diropargs (xdrs, &objp->from))
0518          return FALSE;
0519      if (!xdr_diropargs (xdrs, &objp->to))
0520          return FALSE;
0521     return TRUE;
0522 }
0523 
0524 bool_t
0525 xdr_linkargs (XDR *xdrs, linkargs *objp)
0526 {
0527     register int32_t *buf;
0528 
0529      if (!xdr_nfs_fh (xdrs, &objp->from))
0530          return FALSE;
0531      if (!xdr_diropargs (xdrs, &objp->to))
0532          return FALSE;
0533     return TRUE;
0534 }
0535 
0536 bool_t
0537 xdr_symlinkargs (XDR *xdrs, symlinkargs *objp)
0538 {
0539     register int32_t *buf;
0540 
0541      if (!xdr_diropargs (xdrs, &objp->from))
0542          return FALSE;
0543      if (!xdr_nfspath (xdrs, &objp->to))
0544          return FALSE;
0545      if (!xdr_sattr (xdrs, &objp->attributes))
0546          return FALSE;
0547     return TRUE;
0548 }
0549 
0550 bool_t
0551 xdr_nfscookie (XDR *xdrs, nfscookie objp)
0552 {
0553     register int32_t *buf;
0554 
0555      if (!xdr_opaque (xdrs, objp, NFS_COOKIESIZE))
0556          return FALSE;
0557     return TRUE;
0558 }
0559 
0560 bool_t
0561 xdr_readdirargs (XDR *xdrs, readdirargs *objp)
0562 {
0563     register int32_t *buf;
0564 
0565      if (!xdr_nfs_fh (xdrs, &objp->dir))
0566          return FALSE;
0567      if (!xdr_nfscookie (xdrs, objp->cookie))
0568          return FALSE;
0569      if (!xdr_u_int (xdrs, &objp->count))
0570          return FALSE;
0571     return TRUE;
0572 }
0573 
0574 bool_t
0575 xdr_entry (XDR *xdrs, entry *objp)
0576 {
0577     register int32_t *buf;
0578 
0579      if (!xdr_u_int (xdrs, &objp->fileid))
0580          return FALSE;
0581      if (!xdr_filename (xdrs, &objp->name))
0582          return FALSE;
0583      if (!xdr_nfscookie (xdrs, objp->cookie))
0584          return FALSE;
0585      if (!xdr_pointer (xdrs, (char **)&objp->nextentry, sizeof (entry), (xdrproc_t) xdr_entry))
0586          return FALSE;
0587     return TRUE;
0588 }
0589 
0590 bool_t
0591 xdr_dirlist (XDR *xdrs, dirlist *objp)
0592 {
0593     register int32_t *buf;
0594 
0595      if (!xdr_pointer (xdrs, (char **)&objp->entries, sizeof (entry), (xdrproc_t) xdr_entry))
0596          return FALSE;
0597      if (!xdr_bool (xdrs, &objp->eof))
0598          return FALSE;
0599     return TRUE;
0600 }
0601 
0602 bool_t
0603 xdr_readdirres (XDR *xdrs, readdirres *objp)
0604 {
0605     register int32_t *buf;
0606 
0607      if (!xdr_nfsstat (xdrs, &objp->status))
0608          return FALSE;
0609     switch (objp->status) {
0610     case NFS_OK:
0611          if (!xdr_dirlist (xdrs, &objp->readdirres_u.reply))
0612              return FALSE;
0613         break;
0614     default:
0615         break;
0616     }
0617     return TRUE;
0618 }
0619 
0620 bool_t
0621 xdr_statfsokres (XDR *xdrs, statfsokres *objp)
0622 {
0623     register int32_t *buf;
0624 
0625 
0626     if (xdrs->x_op == XDR_ENCODE) {
0627         buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
0628         if (buf == NULL) {
0629              if (!xdr_u_int (xdrs, &objp->tsize))
0630                  return FALSE;
0631              if (!xdr_u_int (xdrs, &objp->bsize))
0632                  return FALSE;
0633              if (!xdr_u_int (xdrs, &objp->blocks))
0634                  return FALSE;
0635              if (!xdr_u_int (xdrs, &objp->bfree))
0636                  return FALSE;
0637              if (!xdr_u_int (xdrs, &objp->bavail))
0638                  return FALSE;
0639         } else {
0640             IXDR_PUT_U_LONG(buf, objp->tsize);
0641             IXDR_PUT_U_LONG(buf, objp->bsize);
0642             IXDR_PUT_U_LONG(buf, objp->blocks);
0643             IXDR_PUT_U_LONG(buf, objp->bfree);
0644             IXDR_PUT_U_LONG(buf, objp->bavail);
0645         }
0646         return TRUE;
0647     } else if (xdrs->x_op == XDR_DECODE) {
0648         buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT);
0649         if (buf == NULL) {
0650              if (!xdr_u_int (xdrs, &objp->tsize))
0651                  return FALSE;
0652              if (!xdr_u_int (xdrs, &objp->bsize))
0653                  return FALSE;
0654              if (!xdr_u_int (xdrs, &objp->blocks))
0655                  return FALSE;
0656              if (!xdr_u_int (xdrs, &objp->bfree))
0657                  return FALSE;
0658              if (!xdr_u_int (xdrs, &objp->bavail))
0659                  return FALSE;
0660         } else {
0661             objp->tsize = IXDR_GET_U_LONG(buf);
0662             objp->bsize = IXDR_GET_U_LONG(buf);
0663             objp->blocks = IXDR_GET_U_LONG(buf);
0664             objp->bfree = IXDR_GET_U_LONG(buf);
0665             objp->bavail = IXDR_GET_U_LONG(buf);
0666         }
0667      return TRUE;
0668     }
0669 
0670      if (!xdr_u_int (xdrs, &objp->tsize))
0671          return FALSE;
0672      if (!xdr_u_int (xdrs, &objp->bsize))
0673          return FALSE;
0674      if (!xdr_u_int (xdrs, &objp->blocks))
0675          return FALSE;
0676      if (!xdr_u_int (xdrs, &objp->bfree))
0677          return FALSE;
0678      if (!xdr_u_int (xdrs, &objp->bavail))
0679          return FALSE;
0680     return TRUE;
0681 }
0682 
0683 bool_t
0684 xdr_statfsres (XDR *xdrs, statfsres *objp)
0685 {
0686     register int32_t *buf;
0687 
0688      if (!xdr_nfsstat (xdrs, &objp->status))
0689          return FALSE;
0690     switch (objp->status) {
0691     case NFS_OK:
0692          if (!xdr_statfsokres (xdrs, &objp->statfsres_u.reply))
0693              return FALSE;
0694         break;
0695     default:
0696         break;
0697     }
0698     return TRUE;
0699 }
0700 
0701 bool_t
0702 xdr_fhandle (XDR *xdrs, fhandle objp)
0703 {
0704     register int32_t *buf;
0705 
0706      if (!xdr_opaque (xdrs, objp, FHSIZE))
0707          return FALSE;
0708     return TRUE;
0709 }
0710 
0711 bool_t
0712 xdr_fhstatus (XDR *xdrs, fhstatus *objp)
0713 {
0714     register int32_t *buf;
0715 
0716      if (!xdr_u_int (xdrs, &objp->fhs_status))
0717          return FALSE;
0718     switch (objp->fhs_status) {
0719     case 0:
0720          if (!xdr_fhandle (xdrs, objp->fhstatus_u.fhs_fhandle))
0721              return FALSE;
0722         break;
0723     default:
0724         break;
0725     }
0726     return TRUE;
0727 }
0728 
0729 bool_t
0730 xdr_dirpath (XDR *xdrs, dirpath *objp)
0731 {
0732     register int32_t *buf;
0733 
0734      if (!xdr_string (xdrs, objp, MNTPATHLEN))
0735          return FALSE;
0736     return TRUE;
0737 }
0738 
0739 bool_t
0740 xdr_name (XDR *xdrs, name *objp)
0741 {
0742     register int32_t *buf;
0743 
0744      if (!xdr_string (xdrs, objp, MNTNAMLEN))
0745          return FALSE;
0746     return TRUE;
0747 }
0748 
0749 bool_t
0750 xdr_mountlist (XDR *xdrs, mountlist *objp)
0751 {
0752     register int32_t *buf;
0753 
0754      if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
0755          return FALSE;
0756     return TRUE;
0757 }
0758 
0759 bool_t
0760 xdr_mountbody (XDR *xdrs, mountbody *objp)
0761 {
0762     register int32_t *buf;
0763 
0764      if (!xdr_name (xdrs, &objp->ml_hostname))
0765          return FALSE;
0766      if (!xdr_dirpath (xdrs, &objp->ml_directory))
0767          return FALSE;
0768      if (!xdr_mountlist (xdrs, &objp->ml_next))
0769          return FALSE;
0770     return TRUE;
0771 }
0772 
0773 bool_t
0774 xdr_groups (XDR *xdrs, groups *objp)
0775 {
0776     register int32_t *buf;
0777 
0778      if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
0779          return FALSE;
0780     return TRUE;
0781 }
0782 
0783 bool_t
0784 xdr_groupnode (XDR *xdrs, groupnode *objp)
0785 {
0786     register int32_t *buf;
0787 
0788      if (!xdr_name (xdrs, &objp->gr_name))
0789          return FALSE;
0790      if (!xdr_groups (xdrs, &objp->gr_next))
0791          return FALSE;
0792     return TRUE;
0793 }
0794 
0795 bool_t
0796 xdr_exports (XDR *xdrs, exports *objp)
0797 {
0798     register int32_t *buf;
0799 
0800      if (!xdr_pointer (xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
0801          return FALSE;
0802     return TRUE;
0803 }
0804 
0805 bool_t
0806 xdr_exportnode (XDR *xdrs, exportnode *objp)
0807 {
0808     register int32_t *buf;
0809 
0810      if (!xdr_dirpath (xdrs, &objp->ex_dir))
0811          return FALSE;
0812      if (!xdr_groups (xdrs, &objp->ex_groups))
0813          return FALSE;
0814      if (!xdr_exports (xdrs, &objp->ex_next))
0815          return FALSE;
0816     return TRUE;
0817 }
0818 
0819 bool_t
0820 xdr_ppathcnf (XDR *xdrs, ppathcnf *objp)
0821 {
0822     register int32_t *buf;
0823 
0824     int i;
0825 
0826     if (xdrs->x_op == XDR_ENCODE) {
0827         buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
0828         if (buf == NULL) {
0829              if (!xdr_int (xdrs, &objp->pc_link_max))
0830                  return FALSE;
0831              if (!xdr_short (xdrs, &objp->pc_max_canon))
0832                  return FALSE;
0833              if (!xdr_short (xdrs, &objp->pc_max_input))
0834                  return FALSE;
0835              if (!xdr_short (xdrs, &objp->pc_name_max))
0836                  return FALSE;
0837              if (!xdr_short (xdrs, &objp->pc_path_max))
0838                  return FALSE;
0839              if (!xdr_short (xdrs, &objp->pc_pipe_buf))
0840                  return FALSE;
0841 
0842         } else {
0843         IXDR_PUT_LONG(buf, objp->pc_link_max);
0844         IXDR_PUT_SHORT(buf, objp->pc_max_canon);
0845         IXDR_PUT_SHORT(buf, objp->pc_max_input);
0846         IXDR_PUT_SHORT(buf, objp->pc_name_max);
0847         IXDR_PUT_SHORT(buf, objp->pc_path_max);
0848         IXDR_PUT_SHORT(buf, objp->pc_pipe_buf);
0849         }
0850          if (!xdr_u_char (xdrs, &objp->pc_vdisable))
0851              return FALSE;
0852          if (!xdr_char (xdrs, &objp->pc_xxx))
0853              return FALSE;
0854         buf = XDR_INLINE (xdrs, ( 2 ) * BYTES_PER_XDR_UNIT);
0855         if (buf == NULL) {
0856              if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
0857                 sizeof (short), (xdrproc_t) xdr_short))
0858                  return FALSE;
0859         } else {
0860             {
0861                 register short *genp;
0862 
0863                 for (i = 0, genp = objp->pc_mask;
0864                     i < 2; ++i) {
0865                     IXDR_PUT_SHORT(buf, *genp++);
0866                 }
0867             }
0868         }
0869         return TRUE;
0870     } else if (xdrs->x_op == XDR_DECODE) {
0871         buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
0872         if (buf == NULL) {
0873              if (!xdr_int (xdrs, &objp->pc_link_max))
0874                  return FALSE;
0875              if (!xdr_short (xdrs, &objp->pc_max_canon))
0876                  return FALSE;
0877              if (!xdr_short (xdrs, &objp->pc_max_input))
0878                  return FALSE;
0879              if (!xdr_short (xdrs, &objp->pc_name_max))
0880                  return FALSE;
0881              if (!xdr_short (xdrs, &objp->pc_path_max))
0882                  return FALSE;
0883              if (!xdr_short (xdrs, &objp->pc_pipe_buf))
0884                  return FALSE;
0885 
0886         } else {
0887         objp->pc_link_max = IXDR_GET_LONG(buf);
0888         objp->pc_max_canon = IXDR_GET_SHORT(buf);
0889         objp->pc_max_input = IXDR_GET_SHORT(buf);
0890         objp->pc_name_max = IXDR_GET_SHORT(buf);
0891         objp->pc_path_max = IXDR_GET_SHORT(buf);
0892         objp->pc_pipe_buf = IXDR_GET_SHORT(buf);
0893         }
0894          if (!xdr_u_char (xdrs, &objp->pc_vdisable))
0895              return FALSE;
0896          if (!xdr_char (xdrs, &objp->pc_xxx))
0897              return FALSE;
0898         buf = XDR_INLINE (xdrs, ( 2 ) * BYTES_PER_XDR_UNIT);
0899         if (buf == NULL) {
0900              if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
0901                 sizeof (short), (xdrproc_t) xdr_short))
0902                  return FALSE;
0903         } else {
0904             {
0905                 register short *genp;
0906 
0907                 for (i = 0, genp = objp->pc_mask;
0908                     i < 2; ++i) {
0909                     *genp++ = IXDR_GET_SHORT(buf);
0910                 }
0911             }
0912         }
0913      return TRUE;
0914     }
0915 
0916      if (!xdr_int (xdrs, &objp->pc_link_max))
0917          return FALSE;
0918      if (!xdr_short (xdrs, &objp->pc_max_canon))
0919          return FALSE;
0920      if (!xdr_short (xdrs, &objp->pc_max_input))
0921          return FALSE;
0922      if (!xdr_short (xdrs, &objp->pc_name_max))
0923          return FALSE;
0924      if (!xdr_short (xdrs, &objp->pc_path_max))
0925          return FALSE;
0926      if (!xdr_short (xdrs, &objp->pc_pipe_buf))
0927          return FALSE;
0928      if (!xdr_u_char (xdrs, &objp->pc_vdisable))
0929          return FALSE;
0930      if (!xdr_char (xdrs, &objp->pc_xxx))
0931          return FALSE;
0932      if (!xdr_vector (xdrs, (char *)objp->pc_mask, 2,
0933         sizeof (short), (xdrproc_t) xdr_short))
0934          return FALSE;
0935     return TRUE;
0936 }