Section 5 Specifications of a Config File
Rev. 1.01 Mar. 17, 2008 Page 40 of 128
REJ10J1822-0101
(2) Model 2
Model 2 applies when SVR_AUTH has been specified.
In this model, the application assigns the server ID and server version. RPCGEN outputs
definitions of the server ID and server version in <config file>_public.h so that the application is
able to acquire this information.
Each of the client-stub functions is in the form of rpcclnt_<server name>_<server function name>
and its first and second parameters are the server ID and server version, respectively. The third and
subsequent parameters are the parameters of the actual server function. In other words, all of the
client-stub functions have APIs that differ from the server functions. To make the client-stub
functions have the same APIs as the original server functions, the user must implement wrapper
functions for the client-stub functions.
RPCGEN outputs definitions of the server ID and server version to <config file>_public.h.
Applications that call client-stub functions and the server-initialization function must thus include
<config file>_public.h so that the server ID and version are specified.
If <config file>_public.h for the client and server are from different generations, the RPC library
treats any RPC call as an error.