Overview of TI-RPC Interface Routines
RPC has multiple levels of application interface to its services. These levels provide
different degrees of control balanced with different amounts of interface code to implement,
in order of increasing control and complexity. This section gives a summary of the routines
available at each level.
Simplified TI-RPC Interface Routines
The simplified interfaces are used to make remote procedure calls to routines on other
systems, and specify only the type of transport to use. The routines at this level are used
for most applications. Descriptions and code samples are in the section Simplified Interface.
Table 1 RPC Routines – Simplified Level
|
|
|
Registers a procedure as an RPC program on all transports of the specified
type
|
rpc_call()
|
Remotely calls the specified procedure on the specified remote host
|
|
Broadcasts a call message across all transports of the specified type
|
|
Standard Interface Routines
The standard interfaces are divided into top level,
intermediate level, expert level, and
bottom level. These interfaces give a programmer much greater control
over communication parameters such as the transport being used, how long to wait before
responding to errors and retransmitting requests, and so on.
Top-Level Routines
At the top level, the interface is still simple, but the program has to create a client handle
before making a call or create a server handle before receiving calls. If you want the
application to run on all transports, use this interface. You can find the use of these
routines and code samples in Top-Level Interface.
Table 2 RPC Routines – Top Level
|
|
|
Generic client creation. The program tells clnt_create()
where the server is located and the type of transport to use.
|
|
Similar to clnt_create() but enables the programmer to
specify the maximum time allowed for each type of transport tried during the
creation attempt.
|
|
Creates server handles for all transports of the specified type. The program
tells svc_create() which dispatch function to use.
|
clnt_call()()
|
Client calls a procedure to send a request to the server.
|
|
Intermediate-Level Routines
The intermediate level interface of RPC enables you to you control details. Programs written
at these lower levels are more complicated but run more efficiently. The intermediate
level enables you to specify the transport to use. Intermediate-Level Interface describes the use of these routines and code
samples.
Table 3 RPC Routines – Intermediate Level
|
|
|
Creates a client handle for the specified transport
|
|
Similar to clnt_tp_create() but enables the programmer to
specify the maximum time allowed
|
|
Creates a server handle for the specified transport
|
clnt_call()()
|
Client calls a procedure to send a request to the server
|
|
Expert-Level RPC Routines
The expert level contains a larger set of routines with which to specify
transport-related parameters. Expert-Level Interface describes the use of these routines and code samples.
Table 4 RPC Routines – Expert
Level
|
|
|
Creates a client handle for the specified transport
|
svc_tli_create()
|
Creates a server handle for the specified transport
|
|
Calls rpcbind to set a map between an RPC service and a
network address
|
|
Deletes a mapping set by rpcb_set()
|
|
Calls rpcbind() to get the transport addresses of
specified RPC services
|
svc_reg()
|
Associates the specified program and version number pair with the specified
dispatch routine
|
|
Deletes an association set by svc_reg()
|
clnt_call()()
|
Client calls a procedure to send a request to the server
|
|
Bottom-Level RPC Routines
The bottom level contains routines used for full control of transport
options. Bottom-Level Interface
describes
these routines.
Table 5 RPC Routines – Bottom Level
|
|
|
Creates an RPC client handle for the specified remote program using a
connectionless transport
|
|
Creates an RPC server handle using a connectionless transport
|
|
Creates an RPC client handle for the specified remote program using a
connection-oriented transport
|
|
Creates an RPC server handle using a connection-oriented transport
|
clnt_call()()
|
Client calls a procedure to send a request to the server
|
|