The RPC Language compiler is called rpcgen. It generates an include file, client stub, server stub, and a procedure to perform data representation translation of the input parameter and the output parameter to a common data representation for transmission over the network.
The client stub produced by rpcgen is incomplete. It is not ready to be used by the client application, i.e., the client stub generated must be enhanced to provide an application call of the form:
c = binop_add(a,b);For the simplest cases of RPC applications, e.g., no authentication and idempotent call semantics, the procedure callrpc() is used to make the call from the client application and the client stub from rpcgen is unnecessary. In more complicated RPC applications, e.g., where the functionality of some kind of authentication and/or at-most-once call semantics is needed, the client stub needed requires at least twice the number of lines of code as is generated for the client stub by rpcgen. Again, this extra client stub code must be produced by the application developer.
On the other hand, the server stub produced by rpcgen is nearly complete for the majority of RPC applications. In the simplest applications, e.g., no authentication, the server stub is complete. For a more complicated application, e.g., some level of authentication, only minor modifications to the server stub must be made.
In addition to the files generated by rpcgen in the original implementation of ONC RPC, the rpcgen compiler of TI RPC produces a makefile (i.e., an input file to the make processor) which handles the generation of the client and server executables. Moreover the TI RPC rpcgen compiler produces a more complete client stub which is referred to as a ``template.'' While this template provides considerable help, it must be modified in all cases by the developer of the RPC application.