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

#include <stdio.h>
#include <rpc/rpc.h>
#include "../generated/mcrpc.h"
#include <sys/time.h>

void
initialization_server_1(rqstp, transp)
	struct svc_req *rqstp;
	register SVCXPRT *transp;
{
	union {
		workstationprognum procmod_register_1_arg;
		workstationprognum procmod_unregister_1_arg;
		int procmod_check_active_1_arg;
	} argument;
	char *result;
	bool_t (*xdr_argument)(), (*xdr_result)();
	char *(*local)();

	switch (rqstp->rq_proc) {
	case NULLPROC:
		(void) svc_sendreply(transp, xdr_void, (char *)NULL);
		return;

	case PROCMOD_REGISTER:
		xdr_argument = xdr_workstationprognum;
		xdr_result = xdr_void;
		local = (char *(*)()) procmod_register_1;
		break;

	case PROCMOD_UNREGISTER:
		xdr_argument = xdr_workstationprognum;
		xdr_result = xdr_void;
		local = (char *(*)()) procmod_unregister_1;
		break;

	case PROCMOD_CHECK_ACTIVE:
		xdr_argument = xdr_int;
		xdr_result = xdr_int;
		local = (char *(*)()) procmod_check_active_1;
		break;

	case RPC_SERVICE_STOP:
		xdr_argument = xdr_void;
		xdr_result = xdr_void;
		local = (char *(*)()) rpc_service_stop_1;
		break;

	default:
		svcerr_noproc(transp);
		return;
	}
	bzero((char *)&argument, sizeof(argument));
	if (!svc_getargs(transp, xdr_argument, &argument)) {
		svcerr_decode(transp);
		return;
	}
	result = (*local)(&argument, rqstp);
	if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
		svcerr_systemerr(transp);
	}
	if (!svc_freeargs(transp, xdr_argument, &argument)) {
		fprintf(stderr, "unable to free arguments");
		exit(1);
	}
	return;
}
