Homework for RPC - CISC879 Prepared by Tam Vu --- Due March 13, 2003 In this exercise, you will have a chance to work with rpcgen, if not before :-) rpcgen is a compiler which accepts a remote program interface definition written in a C-like language. It produces a C language output that includes stub versions of the client routines, a server skeleton, XDR filter routines for both parameters and results, and a header file that contains common definitions. You may find the following materials helpful: 1. http://www.cisco.com/univercd/cc/td/doc/product/software/ioss390/ios390rp/rprpcgen.htm (only sub section “Converting Local Procedures into Remote Procedures”) 2. man page about rpcgen 3. man page about gethostname() Exercise: Implement a remote version of a procedure to compute pi number, using the formula: pi = 4 * (1 – 1/3 + 1/5 -1/7 ...) the procedure should return the pi value and the host (server) name. The gethostname() function can be called to get the host name. Turn in your code.