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

#include "fs.h"
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <sys/socket.h>
#include <netinet/in.h>

static void
fs_1(rqstp, transp)
	struct svc_req *rqstp;
	register SVCXPRT *transp;
{
	union {
		uebertrage transport_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 TRANSPORT:
		xdr_argument = xdr_uebertrage;
		xdr_result = xdr_zeile;
		local = (char *(*)()) transport_1;
		break;

	default:
		svcerr_noproc (transp);
		return;
	}
	memset ((char *)&argument, 0, 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;
}

int
main (argc, argv)
	int argc;
	char **argv;
{
	register SVCXPRT *transp;

	pmap_unset (FS, FSVERS);

	transp = svcudp_create(RPC_ANYSOCK);
	if (transp == NULL) {
		fprintf (stderr, "cannot create udp service.");
		exit(1);
	}
	if (!svc_register(transp, FS, FSVERS, fs_1, IPPROTO_UDP)) {
		fprintf (stderr, "unable to register (FS, FSVERS, udp).");
		exit(1);
	}

	transp = svctcp_create(RPC_ANYSOCK, 0, 0);
	if (transp == NULL) {
		fprintf (stderr, "cannot create tcp service.");
		exit(1);
	}
	if (!svc_register(transp, FS, FSVERS, fs_1, IPPROTO_TCP)) {
		fprintf (stderr, "unable to register (FS, FSVERS, tcp).");
		exit(1);
	}

	svc_run ();
	fprintf (stderr, "svc_run returned");
	exit (1);
	/* NOTREACHED */
}
