bool_t xdr_symlink( XDR * xdrs, char * params_ptr) { symlinkargs * symlinkargs_ptr; nfsstat * nfsstat_ptr; switch (xdrs->x_op) { case XDR_ENCODE: /* LINTED pointer cast */ symlinkargs_ptr = (symlinkargs *) params_ptr; return(xdr_diropargs(xdrs, &symlinkargs_ptr->from) && xdr_path(xdrs, &symlinkargs_ptr->to) && xdr_sattr(xdrs, &symlinkargs_ptr->attributes)); case XDR_DECODE: /* LINTED pointer cast */ nfsstat_ptr = (nfsstat *) params_ptr; return(xdr_nfsstat(xdrs, nfsstat_ptr)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_statfs( XDR * xdrs, char * params_ptr) { fhandle_t * fhandle_ptr; statfsres * statfsres_ptr; switch (xdrs->x_op) { case XDR_ENCODE: fhandle_ptr = (fhandle_t *) params_ptr; return(xdr_f_handle(xdrs, fhandle_ptr)); case XDR_DECODE: /* LINTED pointer cast */ statfsres_ptr = (statfsres *) params_ptr; if (!xdr_nfsstat(xdrs, &statfsres_ptr->status)) { return(FALSE); } if (statfsres_ptr->status != NFS_OK) { return(TRUE); } return(xdr_u_int(xdrs, &statfsres_ptr->statfsres_u.reply.tsize) && xdr_u_int(xdrs, &statfsres_ptr->statfsres_u.reply.bsize) && xdr_u_int(xdrs, &statfsres_ptr->statfsres_u.reply.blocks) && xdr_u_int(xdrs, &statfsres_ptr->statfsres_u.reply.bfree) && xdr_u_int(xdrs, &statfsres_ptr->statfsres_u.reply.bavail)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_link( XDR * xdrs, char * params_ptr) { linkargs * linkargs_ptr; nfsstat * nfsstat_ptr; switch (xdrs->x_op) { case XDR_ENCODE: /* LINTED pointer cast */ linkargs_ptr = (linkargs *) params_ptr; return(xdr_f_handle(xdrs, &linkargs_ptr->from) && xdr_diropargs(xdrs, &linkargs_ptr->to)); case XDR_DECODE: /* LINTED pointer cast */ nfsstat_ptr = (nfsstat *) params_ptr; return(xdr_nfsstat(xdrs, nfsstat_ptr)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_readlink( XDR * xdrs, char * params_ptr) { fhandle_t * fhandle_ptr; readlinkres * readlinkres_ptr; switch(xdrs->x_op) { case XDR_ENCODE: fhandle_ptr = (fhandle_t *) params_ptr; return(xdr_f_handle(xdrs, fhandle_ptr)); case XDR_DECODE: /* LINTED pointer cast */ readlinkres_ptr = (readlinkres *) params_ptr; if (!xdr_nfsstat(xdrs, &readlinkres_ptr->status)) { return(FALSE); } if (readlinkres_ptr->status != NFS_OK) { return(TRUE); } return(xdr_bytes(xdrs, &readlinkres_ptr->readlinkres_u.data, (unsigned int *) &readlinkres_ptr->readlinkres_u.len, (unsigned int) NFS_MAXPATHLEN)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_fhstatus( XDR * xdrs, struct fhstatus * fhsp) { if (!xdr_nfsstat(xdrs, (nfsstat *) &fhsp->fhs_status)) { return(FALSE); } if (fhsp->fhs_status != (int)NFS_OK) { return(TRUE); } return(xdr_f_handle(xdrs, &fhsp->fhs_fh)); }
static bool_t xdr_attrstat( XDR * xdrs, attrstat * attrstat_ptr) { if (!xdr_nfsstat(xdrs, &attrstat_ptr->status)) { return(FALSE); } if (attrstat_ptr->status == NFS_OK) { return(xdr_fattr(xdrs, &attrstat_ptr->attrstat_u.attributes)); } return(TRUE); }
bool_t xdr_diropres (XDR *xdrs, diropres *objp) { if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_diropokres (xdrs, &objp->diropres_u.diropres)) return FALSE; break; default: break; } return TRUE; }
static bool_t xdr_diropres( XDR * xdrs, diropres * dir_res_ptr) { if (!xdr_nfsstat(xdrs, &dir_res_ptr->status)) { return(FALSE); } if (dir_res_ptr->status == NFS_OK) { return(xdr_f_handle(xdrs, &dir_res_ptr->diropres_u.diropres.file) && xdr_fattr(xdrs, &dir_res_ptr->diropres_u.diropres.attributes)); } return(TRUE); }
bool_t xdr_statfsres (XDR *xdrs, statfsres *objp) { if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_statfsokres (xdrs, &objp->statfsres_u.reply)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_readdirres (XDR *xdrs, readdirres *objp) { if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_dirlist (xdrs, &objp->readdirres_u.reply)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_readlinkres (XDR *xdrs, readlinkres *objp) { if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_nfspath (xdrs, &objp->readlinkres_u.data)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_attrstat (XDR *xdrs, attrstat *objp) { if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_fattr (xdrs, &objp->attrstat_u.attributes)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_readres(XDR *xdrs, readres *objp) { if (!xdr_nfsstat(xdrs, &objp->status)) return (FALSE); switch (objp->status) { case NFS_OK: if (!xdr_readokres(xdrs, &objp->readres_u.reply)) return (FALSE); break; default: break; } return (TRUE); }
bool_t xdr_readdirres (XDR *xdrs, readdirres *objp) { register long *buf; if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_readdirok_tag (xdrs, &objp->readdirres_u.readdirok)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_statfsres (XDR *xdrs, statfsres *objp) { register long *buf; if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_info_tag (xdrs, &objp->statfsres_u.info)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_readres (XDR *xdrs, readres *objp) { register int32_t *buf; if (!xdr_nfsstat (xdrs, &objp->status)) return FALSE; switch (objp->status) { case NFS_OK: if (!xdr_readokres (xdrs, &objp->readres_u.reply)) return FALSE; break; default: break; } return TRUE; }
bool_t xdr_statfsres(XDR *xdrs, nfsstatfsres *objp) { if (amuDebug(D_XDRTRACE)) plog(XLOG_DEBUG, "xdr_statfsres:"); if (!xdr_nfsstat(xdrs, &objp->sfr_status)) { return (FALSE); } switch (objp->sfr_status) { case NFS_OK: if (!xdr_statfsokres(xdrs, &objp->sfr_u.sfr_reply_u)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_readlinkres(XDR *xdrs, readlinkres *objp) { register long *buf; if (!xdr_nfsstat(xdrs, &objp->status)) { return (FALSE); } switch (objp->status) { case NFS_OK: if (!xdr_nfspath(xdrs, &objp->readlinkres_u.data)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_attrstat(XDR *xdrs, nfsattrstat *objp) { if (amuDebug(D_XDRTRACE)) plog(XLOG_DEBUG, "xdr_attrstat:"); if (!xdr_nfsstat(xdrs, &objp->ns_status)) { return (FALSE); } switch (objp->ns_status) { case NFS_OK: if (!xdr_fattr(xdrs, &objp->ns_u.ns_attr_u)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_statfsres(XDR *xdrs, statfsres *objp) { register long *buf; if (!xdr_nfsstat(xdrs, &objp->status)) { return (FALSE); } switch (objp->status) { case NFS_OK: if (!xdr_statfsokres(xdrs, &objp->statfsres_u.reply)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_attrstat(XDR *xdrs, attrstat *objp) { register long *buf; if (!xdr_nfsstat(xdrs, &objp->status)) { return (FALSE); } switch (objp->status) { case NFS_OK: if (!xdr_fattr(xdrs, &objp->attrstat_u.attributes)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_diropres(XDR *xdrs, diropres *objp) { register int32_t *buf = buf; if(!xdr_nfsstat(xdrs, &objp->status)) { return (FALSE); } switch(objp->status) { case NFS_OK: if(!xdr_diropokres(xdrs, &objp->diropres_u.diropres)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_readdirres(XDR *xdrs, readdirres *objp) { register int32_t *buf = buf; if(!xdr_nfsstat(xdrs, &objp->status)) { return (FALSE); } switch(objp->status) { case NFS_OK: if(!xdr_dirlist(xdrs, &objp->readdirres_u.reply)) { return (FALSE); } break; default: break; } return (TRUE); }
bool_t xdr_read( XDR * xdrs, char * params_ptr) { readargs * readargs_ptr; readres * readres_ptr; switch (xdrs->x_op) { case XDR_ENCODE: /* LINTED pointer cast */ readargs_ptr = (readargs *) params_ptr; return(xdr_f_handle(xdrs, &readargs_ptr->file) && xdr_u_int(xdrs, &readargs_ptr->offset) && xdr_u_int(xdrs, &readargs_ptr->count) && xdr_u_int(xdrs, &readargs_ptr->totalcount)); case XDR_DECODE: /* LINTED pointer cast */ readres_ptr = (readres *) params_ptr; if (!xdr_nfsstat(xdrs, &readres_ptr->status)) { return(FALSE); } if (readres_ptr->status != NFS_OK) { return(TRUE); } return(xdr_fattr(xdrs, &readres_ptr->readres_u.reply.attributes) && xdr_bytes(xdrs, &readres_ptr->readres_u.reply.data.data_val, &readres_ptr->readres_u.reply.data.data_len, (unsigned int) NFS_MAXDATA)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_rmdir( XDR * xdrs, char * params_ptr) { diropargs * diropargs_ptr; nfsstat * nfsstat_ptr; switch (xdrs->x_op) { case XDR_ENCODE: /* LINTED pointer cast */ diropargs_ptr = (diropargs *) params_ptr; return(xdr_diropargs(xdrs, diropargs_ptr)); case XDR_DECODE: /* LINTED pointer cast */ nfsstat_ptr = (nfsstat *) params_ptr; return(xdr_nfsstat(xdrs, nfsstat_ptr)); default: return(FALSE); } /* switch on operation */ }
bool_t xdr_nfslog_sharefsres(XDR *xdrs, nfslog_sharefsres *objp) { return (xdr_nfsstat(xdrs, objp)); }
bool_t xdr_readdir( XDR * xdrs, char * params_ptr) { readdirargs * readdirargs_ptr; readdirres * readdirres_ptr; entry * entry_ptr; int n; /* entry ctr */ switch (xdrs->x_op) { case XDR_ENCODE: /* LINTED pointer cast */ readdirargs_ptr = (readdirargs *) params_ptr; return(xdr_f_handle(xdrs, &readdirargs_ptr->dir) && xdr_opaque(xdrs, (char *) readdirargs_ptr->cookie, NFS_COOKIESIZE) && xdr_u_int(xdrs, &readdirargs_ptr->count)); case XDR_DECODE: /* LINTED pointer cast */ readdirres_ptr = (readdirres *) params_ptr; if (!xdr_nfsstat(xdrs, &readdirres_ptr->status)) { return(FALSE); } if (readdirres_ptr->status != NFS_OK) { return(TRUE); } /* * go thru the stream of entries until hit an invalid one * or have gotten all the user asked for. * * max_entries is read to obtain a maximum. it is written * to return how many entries were decoded. */ entry_ptr = readdirres_ptr->readdirres_u.reply.entries; n = 0; while (n < readdirres_ptr->readdirres_u.reply.max_entries) { if (!xdr_bool(xdrs, &entry_ptr->valid)) { return(FALSE); } if (!entry_ptr->valid) { break; } if (!xdr_u_int(xdrs, &entry_ptr->fileid)) { return(FALSE); } if (!xdr_uint16_t(xdrs, &entry_ptr->name_len)) { return(FALSE); } if (!xdr_opaque(xdrs, entry_ptr->name, entry_ptr->name_len)) { return(FALSE); } if (!xdr_opaque(xdrs, entry_ptr->cookie, NFS_COOKIESIZE)) { return(FALSE); } n++; entry_ptr++; } /* while extracting entries */ /* If we are at the user's data buffer limit, stop right now. */ if (n == readdirres_ptr->readdirres_u.reply.max_entries) { return(TRUE); } /* Return how many entries were gotten for the dirlist */ readdirres_ptr->readdirres_u.reply.max_entries = n; /* check the EOF flag for the dirlist */ if(!xdr_bool(xdrs, &readdirres_ptr->readdirres_u.reply.eof)) { return(FALSE); } return(TRUE); default: return(FALSE); } /* switch on operation */ }