/* * 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 "sq.h" void squareprog_1(host) char *host; { CLIENT *clnt; int *result_1; int square_1_arg; #ifndef DEBUG clnt = clnt_create(host, SQUAREPROG, SQUAREVER, "netpath"); if (clnt == (CLIENT *) NULL) { clnt_pcreateerror(host); exit(1); } #endif /* DEBUG */ result_1 = square_1(&square_1_arg, clnt); if (result_1 == (int *) NULL) { clnt_perror(clnt, "call failed"); } #ifndef DEBUG clnt_destroy(clnt); #endif /* DEBUG */ } main(argc, argv) int argc; char *argv[]; { char *host; if (argc < 2) { printf("usage: %s server_host\n", argv[0]); exit(1); } host = argv[1]; squareprog_1(host); }