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

#include "guestlibV3.h"

bool_t
xdr_GuestLibV3StatUint32 (XDR *xdrs, GuestLibV3StatUint32 *objp)
{

	 if (!xdr_Bool (xdrs, &objp->valid))
		 return FALSE;
	 if (!xdr_uint32 (xdrs, &objp->value))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GuestLibV3StatUint64 (XDR *xdrs, GuestLibV3StatUint64 *objp)
{

	 if (!xdr_Bool (xdrs, &objp->valid))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->value))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GuestLibV3String (XDR *xdrs, GuestLibV3String *objp)
{

	 if (!xdr_Bool (xdrs, &objp->valid))
		 return FALSE;
	 if (!xdr_string (xdrs, &objp->value, GUESTLIBV3_STRING_SIZE))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GuestLibV3ByteArray (XDR *xdrs, GuestLibV3ByteArray *objp)
{

	 if (!xdr_Bool (xdrs, &objp->valid))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->value.value_val, (u_int *) &objp->value.value_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GuestLibV3StatCount (XDR *xdrs, GuestLibV3StatCount *objp)
{

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

bool_t
xdr_GuestLibV3TypeIds (XDR *xdrs, GuestLibV3TypeIds *objp)
{

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_GuestLibV3Stat (XDR *xdrs, GuestLibV3Stat *objp)
{

	 if (!xdr_GuestLibV3TypeIds (xdrs, &objp->d))
		 return FALSE;
	switch (objp->d) {
	case GUESTLIB_CPU_RESERVATION_MHZ:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.cpuReservationMHz))
			 return FALSE;
		break;
	case GUESTLIB_CPU_LIMIT_MHZ:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.cpuLimitMHz))
			 return FALSE;
		break;
	case GUESTLIB_CPU_SHARES:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.cpuShares))
			 return FALSE;
		break;
	case GUESTLIB_CPU_USED_MS:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.cpuUsedMs))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MHZ:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.hostMHz))
			 return FALSE;
		break;
	case GUESTLIB_MEM_RESERVATION_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memReservationMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_LIMIT_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memLimitMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SHARES:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memShares))
			 return FALSE;
		break;
	case GUESTLIB_MEM_MAPPED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memMappedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_ACTIVE_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memActiveMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_OVERHEAD_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memOverheadMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_BALLOONED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memBalloonedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SWAPPED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memSwappedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SHARED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memSharedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SHARED_SAVED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memSharedSavedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_USED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memUsedMB))
			 return FALSE;
		break;
	case GUESTLIB_ELAPSED_MS:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.elapsedMs))
			 return FALSE;
		break;
	case GUESTLIB_RESOURCE_POOL_PATH:
		 if (!xdr_GuestLibV3String (xdrs, &objp->GuestLibV3Stat_u.resourcePoolPath))
			 return FALSE;
		break;
	case GUESTLIB_CPU_STOLEN_MS:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.cpuStolenMs))
			 return FALSE;
		break;
	case GUESTLIB_MEM_TARGET_SIZE_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.memTargetSizeMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_CPU_NUM_CORES:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.hostCpuNumCores))
			 return FALSE;
		break;
	case GUESTLIB_HOST_CPU_USED_MS:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostCpuUsedMs))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_SWAPPED_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemSwappedMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_SHARED_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemSharedMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_USED_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemUsedMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_PHYS_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemPhysMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_PHYS_FREE_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemPhysFreeMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_KERN_OVHD_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemKernOvhdMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_MAPPED_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemMappedMB))
			 return FALSE;
		break;
	case GUESTLIB_HOST_MEM_UNMAPPED_MB:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.hostMemUnmappedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_ZIPPED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memZippedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_ZIPSAVED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memZipSavedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_LLSWAPPED_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memLLSwappedMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SWAP_TARGET_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memSwapTargetMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_BALLOON_TARGET_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memBalloonTargetMB))
			 return FALSE;
		break;
	case GUESTLIB_MEM_BALLOON_MAX_MB:
		 if (!xdr_GuestLibV3StatUint32 (xdrs, &objp->GuestLibV3Stat_u.memBalloonMaxMB))
			 return FALSE;
		break;
	case GUESTLIB_RESOURCE_POOL_PATH_LONG:
		 if (!xdr_GuestLibV3ByteArray (xdrs, &objp->GuestLibV3Stat_u.resourcePoolPathLong))
			 return FALSE;
		break;
	case GUESTLIB_MEM_SHARES_64:
		 if (!xdr_GuestLibV3StatUint64 (xdrs, &objp->GuestLibV3Stat_u.memShares64))
			 return FALSE;
		break;
	default:
		return FALSE;
	}
	return TRUE;
}
