/* Machine generated file -- Do NOT edit */

#include <afsconfig.h>
#include <afs/param.h>
#include <roken.h>
#ifdef AFS_NT40_ENV
#define AFS_RXGEN_EXPORT __declspec(dllexport)
#endif /* AFS_NT40_ENV */
#include "ubik_int.h"



bool_t
xdr_BDesc(XDR *xdrs, BDesc *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->host)) {
		return (FALSE);
	}
	if (!xdr_short(xdrs, &objp->portal)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->session)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_version(XDR *xdrs, ubik_version *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->epoch)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->counter)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_tid(XDR *xdrs, ubik_tid *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->epoch)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->counter)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_debug(XDR *xdrs, ubik_debug *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->now)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesState)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesClaim)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lowestHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lowestTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncTime)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->syncVersion)) {
		return (FALSE);
	}
	if (!xdr_ubik_tid(xdrs, &objp->syncTid)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->amSyncSite)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncSiteUntil)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nServers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lockedPages)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->writeLockedPages)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->localVersion)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->activeWrite)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->tidCounter)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->anyReadLocks)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->anyWriteLocks)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->recoveryState)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->currentTrans)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->writeTrans)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->epochTime)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->interfaceAddr, UBIK_MAX_INTERFACE_ADDR, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_sdebug(XDR *xdrs, ubik_sdebug *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->addr)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastVoteTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastBeaconSent)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastVote)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->remoteVersion)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->currentDB)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->beaconSinceDown)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->up)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->altAddr, 255, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_debug_old(XDR *xdrs, ubik_debug_old *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->now)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesState)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastYesClaim)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lowestHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lowestTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncHost)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncTime)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->syncVersion)) {
		return (FALSE);
	}
	if (!xdr_ubik_tid(xdrs, &objp->syncTid)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->amSyncSite)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->syncSiteUntil)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nServers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lockedPages)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->writeLockedPages)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->localVersion)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->activeWrite)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->tidCounter)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->anyReadLocks)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->anyWriteLocks)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->recoveryState)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->currentTrans)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->writeTrans)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->epochTime)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_ubik_sdebug_old(XDR *xdrs, ubik_sdebug_old *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->addr)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastVoteTime)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastBeaconSent)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->lastVote)) {
		return (FALSE);
	}
	if (!xdr_ubik_version(xdrs, &objp->remoteVersion)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->currentDB)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->beaconSinceDown)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->up)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_UbikInterfaceAddr(XDR *xdrs, UbikInterfaceAddr *objp)
{
	if (!xdr_vector(xdrs, (char *) objp->hostAddr, UBIK_MAX_INTERFACE_ADDR, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_bulkdata(XDR *xdrs, bulkdata *objp)
{
	{
		u_int __len = (u_int) *(&objp->bulkdata_len);
		if (!xdr_bytes(xdrs, (char **)&objp->bulkdata_val, &__len, 20000)) {
			return (FALSE);
		}
		*(&objp->bulkdata_len) = __len;
	}
	return (TRUE);
}




bool_t
xdr_iovec_buf(XDR *xdrs, iovec_buf *objp)
{
	{
		u_int __len = (u_int) *(&objp->iovec_buf_len);
		if (!xdr_bytes(xdrs, (char **)&objp->iovec_buf_val, &__len, IOVEC_MAXBUF)) {
			return (FALSE);
		}
		*(&objp->iovec_buf_len) = __len;
	}
	return (TRUE);
}




bool_t
xdr_ubik_iovec(XDR *xdrs, ubik_iovec *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->file)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->position)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->length)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_iovec_wrt(XDR *xdrs, iovec_wrt *objp)
{
	if (!xdr_array(xdrs, (caddr_t *)&objp->iovec_wrt_val, &objp->iovec_wrt_len, IOVEC_MAXWRT, sizeof(ubik_iovec), (xdrproc_t) xdr_ubik_iovec)) {
		return (FALSE);
	}
	return (TRUE);
}


AFS_RXGEN_EXPORT
const char *VOTE_function_names[] = {
	"VOTE_Beacon",
	"VOTE_DebugOld",
	"VOTE_SDebugOld",
	"VOTE_GetSyncSite",
	"VOTE_Debug",
	"VOTE_SDebug",
	"VOTE_XDebug",
	"VOTE_XSDebug"
};
AFS_RXGEN_EXPORT
const char *DISK_function_names[] = {
	"DISK_Begin",
	"DISK_Commit",
	"DISK_Lock",
	"DISK_Write",
	"DISK_GetVersion",
	"DISK_GetFile",
	"DISK_SendFile",
	"DISK_Abort",
	"DISK_ReleaseLocks",
	"DISK_Truncate",
	"DISK_Probe",
	"DISK_WriteV",
	"DISK_UpdateInterfaceAddr",
	"DISK_SetVersion"
};

static char *opnames0[] = {"VOTE_Beacon", "VOTE_DebugOld", "VOTE_SDebugOld", "VOTE_GetSyncSite", "VOTE_Debug", "VOTE_SDebug", "VOTE_XDebug", "VOTE_XSDebug"};

char *VOTE_TranslateOpCode(int op)
{
	if (op < VOTE_LOWEST_OPCODE || op > VOTE_HIGHEST_OPCODE)
		return NULL;
	return opnames0[op - VOTE_LOWEST_OPCODE];
}
struct VOTE_stats *VOTE_OpCodeStats(int op)
{
	if (op < VOTE_LOWEST_OPCODE || op > VOTE_HIGHEST_OPCODE)
		return NULL;
	return NULL;/*0 VOTE_*/
}
char *DISK_TranslateOpCode(int op)
{
	switch (op) {
		case 20000:	return "DISK_Begin";
		case 20001:	return "DISK_Commit";
		case 20002:	return "DISK_Lock";
		case 20003:	return "DISK_Write";
		case 20004:	return "DISK_GetVersion";
		case 20007:	return "DISK_Abort";
		case 20008:	return "DISK_ReleaseLocks";
		case 20009:	return "DISK_Truncate";
		case 20010:	return "DISK_Probe";
		case 20011:	return "DISK_WriteV";
		case 20012:	return "DISK_UpdateInterfaceAddr";
		case 20013:	return "DISK_SetVersion";
		default:
			return NULL;
	}
}
int DISK_OpCodeIndex(int op)
{
	switch (op) {
		case 20000:	return 0;
		case 20001:	return 1;
		case 20002:	return 2;
		case 20003:	return 3;
		case 20004:	return 4;
		case 20007:	return 7;
		case 20008:	return 8;
		case 20009:	return 9;
		case 20010:	return 10;
		case 20011:	return 11;
		case 20012:	return 12;
		case 20013:	return 13;
		default:
			return -1;
	}
}
