The sample RPC programs we looked at in class are here.
Each directory holds the code for a complete RPC system (server and
client), check the README files for more details.
- simple: remote integer add and subtract
procedures.
- ulookup: Remote username and uid lookup
procedures. The server returns the username corresponding to a UID
(on the server system) or the UID corresponding to a username. Among
other things, this example show how to use the XDR string type.
- better_ulookup: Better remote username
and uid lookup procedures. Almost the same as lookup, but now the procedures return complex types
that include a status indicator (to indicate when the lookup
failed).
- rpctalk: RPC based talk program. This
is an example of a hand-made RPC program and includes a custom
dispatcher and asynchronous remote procedures. There is a single
program that acts as both client and server. This code is old, and
although it compiles on BSD machine it doesn't work (primary server
SEGVs as soon as a client connects).
There are also some RFCs heres: