The remote procedure call (RPC) mechanism provides a service to the application programmer to allow transparent use of a server to provide some activity on behalf of the application.
ONCRPC implements Sun's ONC/RPC protocol and is based on the m3rpc package from Xerox Parc. Each call to an RPC function calls a stub function that doesn't actually implement the desired computation, but packs its arguments into a flattened (or marshalled) representation. The stubs used at the client and server processes are generated automatically; the programmer need not define flattening and restructuring mechanisms for each function in the interface. There is a stub generator called m3rpcgen that generates Modula-3 rpc stubs for SPIN. You can use it with the following quake commands:
The ONCRPC module includes a built in portmap server, which didn't originally exist with the original m3rpc implementation. The portmap server should probably be separated into its own module.
The m3rpc package from Xerox was written for the old m3 runtime and a socket based network interface. It has been updated to work with the v3.x based m3 runtime and to be operating system independent. The next step is to move the rpc package over to a Plexus networking stack, rather than a unix socket based network stack.