#include #include #include "firsttry.h" /* CpSc 824 Simple "hello world" program that demonstrates an rpc call. This uses the higher level direct rpc_call(). */ main (int argc, char *argv[]) { char *bufptr; if (argc != 2) { printf("Usage: firstmain hostname\n"); exit(1); } printf("Getting ready to call firsttry\n"); bufptr = NULL; /* Direct call to rpc */ rpc_call(argv[1], FIRSTTRYPROG, FIRSTTRYVERS, FIRSTTRY, xdr_void, NULL, xdr_wrapstring, &bufptr, "netpath"); printf("Back from firsttry\n"); if (bufptr == NULL) { printf("call failed\n"); exit(1); } printf("Returned string=%s\n",bufptr); }