All pastes #580139 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-21 00:01 UTC
rendered paste body
/*
 * This is sample code generated by rpcgen.
 * These are only templates and you can use them
 * as a guideline for developing your own functions.
 */

#include "perf.h"


void
perfect_prog_1(char *host)
{
	CLIENT *clnt;
	long  *result_1;
	int  get_perf_1_arg;

#ifndef	DEBUG
	clnt = clnt_create (host, PERFECT_PROG, PERFECT_VERSION, "udp");
	if (clnt == NULL) {
		clnt_pcreateerror (host);
		exit (1);
	}
#endif	/* DEBUG */

	result_1 = get_perf_1(&get_perf_1_arg, clnt);
	
	if (result_1 == (long *) NULL) {
		clnt_perror (clnt, "call failed");
	}

	printf("El Resultado es: %d\n", result_1);
#ifndef	DEBUG
	clnt_destroy (clnt);
#endif	 /* DEBUG */
}


int
main (int argc, char *argv[])
{
	char *host;

	if (argc < 2) {
		printf ("usage: %s server_host\n", argv[0]);
		exit (1);
	}
	host = argv[1];
	perfect_prog_1 (host);
exit (0);
}