The rpcgen tool generates remote program interface modules. It compiles source code written in the RPC language. The RPC language is similar in syntax and structure to C. The rpcgen tool produces one or more C language source modules, which are then compiled by a C compiler.
The default output of rpcgen is:
A header file of definitions common to the server and the client
A set of XDR routines that translate each data type defined in the header file
rpcgen can optionally generate:
Various transports
A timeout for servers
Server stubs that are not main programs
C-style arguments passing ANSI C-compliant code
An RPC dispatch table that checks authorizations and invokes service routines
rpcgen significantly reduces the development time that would otherwise be spent developing low-level routines. Handwritten routines link easily with the rpcgen output. For a discussion of RPC programming without rpcgen, see Programmer's Interface to RPC.