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-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 2-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 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 2-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 Routines
The bottom level contains routines used for full control of transport
options. Bottom-Level Interface
describes
these routines.
Table 2-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
|
|