bool_t
xdr_readokres (XDR *xdrs, readokres *objp)
{
	 if (!xdr_fattr (xdrs, &objp->attributes))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
		 return FALSE;
	return TRUE;
}
bool_t
xdr_diropokres (XDR *xdrs, diropokres *objp)
{
	 if (!xdr_nfs_fh (xdrs, &objp->file))
		 return FALSE;
	 if (!xdr_fattr (xdrs, &objp->attributes))
		 return FALSE;
	return TRUE;
}
Exemple #3
0
bool_t
xdr_readok_tag (XDR *xdrs, readok_tag *objp)
{
	 register long *buf;

	 if (!xdr_fattr (xdrs, &objp->attributes))
		 return FALSE;
	 if (!xdr_nfsdata (xdrs, &objp->data))
		 return FALSE;
	return TRUE;
}
Exemple #4
0
bool_t
xdr_diropok_tag (XDR *xdrs, diropok_tag *objp)
{
	 register long *buf;

	 if (!xdr_nfsfhandle (xdrs, objp->file))
		 return FALSE;
	 if (!xdr_fattr (xdrs, &objp->attributes))
		 return FALSE;
	return TRUE;
}
Exemple #5
0
bool_t
xdr_diropokres(XDR *xdrs, nfsdiropokres *objp)
{
  if (amuDebug(D_XDRTRACE))
    plog(XLOG_DEBUG, "xdr_diropokres:");

  if (!xdr_nfs_fh(xdrs, &objp->drok_fhandle)) {
    return (FALSE);
  }
  if (!xdr_fattr(xdrs, &objp->drok_attributes)) {
    return (FALSE);
  }
  return (TRUE);
}
bool_t
xdr_readokres(XDR *xdrs, readokres *objp)
{

	 register long *buf;

	 if (!xdr_fattr(xdrs, &objp->attributes)) {
		 return (FALSE);
	 }
	 if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *)&objp->data.data_len, NFS_MAXDATA)) {
		 return (FALSE);
	 }
	return (TRUE);
}
bool_t
xdr_diropokres(XDR *xdrs, diropokres *objp)
{

	 register long *buf;

	 if (!xdr_nfs_fh(xdrs, &objp->file)) {
		 return (FALSE);
	 }
	 if (!xdr_fattr(xdrs, &objp->attributes)) {
		 return (FALSE);
	 }
	return (TRUE);
}
Exemple #8
0
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);
}
Exemple #9
0
bool_t
xdr_attrstat(XDR *xdrs, attrstat *objp)
{

	if (!xdr_int(xdrs, &objp->status))
		return (FALSE);
	switch (objp->status) {
	case NFS_OK:
		if (!xdr_fattr(xdrs, &objp->attrstat_u.attributes))
			return (FALSE);
		break;
	}
	return (TRUE);
}
Exemple #10
0
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_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;
}
Exemple #12
0
bool_t
xdr_readokres(XDR *xdrs, nfsreadokres *objp)
{
  if (amuDebug(D_XDRTRACE))
    plog(XLOG_DEBUG, "xdr_readokres:");

  if (!xdr_fattr(xdrs, &objp->raok_attributes)) {
    return (FALSE);
  }
  if (!xdr_bytes(xdrs,
		 (char **) & objp->raok_u.raok_val_u,
		 (u_int *) & objp->raok_u.raok_len_u,
		 NFS_MAXDATA)) {
    return (FALSE);
  }
  return (TRUE);
}
Exemple #13
0
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_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);
}
Exemple #15
0
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 */
}