Section 8 Application Interface
Rev. 1.01 Mar. 17, 2008 Page 93 of 128
REJ10J1822-0101
Section 8 Application Interface
8.1 Client-Stub Functions Generated by RPCGEN
The client-stub functions are called by the client application.
This section gives the specifications for the client-stub functions generated by RPCGEN. The
client-stub functions must be called in accord with the definitions in these specifications. If
CLNTSTUB is used to prevent creation of client-stub functions, the user must implement client-
stub functions in accord with the specifications.
For details on SVR_AUTH, refer to section 5.5.8, SVR_AUTH.
(1) When SVR_AUTH has not been specified
Each of the client-stub functions has the same API as the actual server function. RPCGEN outputs
the client-stub functions themselves to <config file>_clnt.c but does not output prototype
declarations. Prepare a header file with the required prototype declarations and specify this header
file in the definition of CLNT_INCFILE or GLOBAL_INCFILE.
Example:
Contents of a config file
SVR_NAME{ EXAMPLE };
SVR_ID{ 1 };
SVR_VERSION{ 2 };
// SVR_AUTH;
RPC_FUNC{
int ret = func1([IN DFLT]int par1, [IN DFLT]int par2);
func2([OUT PTR]struct ST *ptr);
};
Specification of a client-stub function
int func1(int par1, int par2);
void func2(struct ST *ptr);