diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-04-29 19:53:34 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-04-29 19:53:34 +0000 |
commit | e6f31688466664d5cb75a0e1603bd42a00e710bd (patch) | |
tree | 1351d1c0ace6b08f2388fed25c47e4a0ffe18c48 /rpc_demo/msg_proc.c | |
parent | 9fd60d591107599a8508531b1152abe52731eb43 (diff) |
New test from Eric Norum <eric@cls.usask.ca> to exercise RPC/XDR.
Diffstat (limited to 'rpc_demo/msg_proc.c')
-rw-r--r-- | rpc_demo/msg_proc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rpc_demo/msg_proc.c b/rpc_demo/msg_proc.c new file mode 100644 index 0000000..229fedf --- /dev/null +++ b/rpc_demo/msg_proc.c @@ -0,0 +1,24 @@ +/* + * Server-side implementation of remote procedure calls + */ +#include <stdio.h> +#include "msg.h" + +int * +printmessage_1_svc(char **argp, struct svc_req *rqstp) +{ + static int result; + + result = printf ("WOW -- RPC WORKS: `%s'\n", *argp); + return &result; +} + +int * +printnum_1_svc(int *argp, struct svc_req *rqstp) +{ + static int result; + + printf ("The number you sent is %d.\n", *argp); + result = *argp * *argp; + return &result; +} |