/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "mount.h"

bool_t
xdr_fhandle(XDR *xdrs, fhandle objp)
{

	if (!xdr_opaque(xdrs, objp, FHSIZE))
		return (FALSE);
	return (TRUE);
}

bool_t
xdr_fhandle3(XDR *xdrs, fhandle3 *objp)
{

	if (!xdr_bytes(xdrs, (char **)(void *)&objp->fhandle3_val, (unsigned int *)&objp->fhandle3_len, FHSIZE3))
		return (FALSE);
	return (TRUE);
}

bool_t
xdr_fhstatus(XDR *xdrs, fhstatus *objp)
{

	if (!xdr_u_int(xdrs, &objp->fhs_status))
		return (FALSE);
	switch (objp->fhs_status) {
	case 0:
		if (!xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle))
			return (FALSE);
		break;
	default:
		break;
	}
	return (TRUE);
}

#define fhs_fh fhstatus_u.fhs_fhandle

bool_t
xdr_mountstat3(XDR *xdrs, mountstat3 *objp)
{
	{
		enum_t et = (enum_t)*objp;
		if (!xdr_enum(xdrs, &et))
			return (FALSE);
		*objp = (mountstat3)et;
	}
	return (TRUE);
}

bool_t
xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
{

	if (!xdr_fhandle3(xdrs, &objp->fhandle))
		return (FALSE);
	if (!xdr_array(xdrs, (char **)(void *)&objp->auth_flavors.auth_flavors_val, (unsigned int *)&objp->auth_flavors.auth_flavors_len, (unsigned int)~0, (unsigned int)sizeof(int), (xdrproc_t)xdr_int))
		return (FALSE);
	return (TRUE);
}

bool_t
xdr_mountres3(XDR *xdrs, mountres3 *objp)
{

	if (!xdr_mountstat3(xdrs, &objp->fhs_status))
		return (FALSE);
	switch (objp->fhs_status) {
	case MNT_OK:
		if (!xdr_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo))
			return (FALSE);
		break;
	default:
		break;
	}
	return (TRUE);
}

bool_t
xdr_dirpath(XDR *xdrs, dirpath *objp)
{

	if (!xdr_string(xdrs, objp, MNTPATHLEN))
		return (FALSE);
	return (TRUE);
}
