ONC+ Developer's Guide

Standard Interface Routines

The standard interfaces are divided into top level, intermediate level, expert level, and bottom level. These interfaces give a developer 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

Routine 

Description 

clnt_create()

Generic client creation. The program tells clnt_create() where the server is located and the type of transport to use.

clnt_create_timed()

Similar to clnt_create() but lets the programmer specify the maximum time allowed for each type of transport tried during the creation attempt.

svc_create()

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. You can find the use of these routines and code samples in "Intermediate Level Interface".

Table 2-3 RPC Routines--Intermediate Level

Routine 

Description 

clnt_tp_create()

Creates a client handle for the specified transport  

clnt_tp_create_timed()

Similar to clnt_tp_create() but lets the programmer specify the maximum time allowed

svc_tp_create()

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. You can find the use of these routines and code samples in "Expert Level Interface".

Table 2-4 RPC Routines--Expert Level

Routine 

Description 

clnt_tli_create()

Creates a client handle for the specified transport 

svc_tli_create()

Creates a server handle for the specified transport 

rpcb_set()

Calls rpcbind to set a map between an RPC service and a network address

rpcb_unset()

Deletes a mapping set by rpcb_set()

rpcb_getaddr()

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 

svc_unreg()

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

Routine 

Description 

clnt_dg_create()

Creates an RPC client handle for the specified remote program, using a connectionless transport  

svc_dg_create()

Creates an RPC server handle, using a connectionless transport 

clnt_vc_create()

Creates an RPC client handle for the specified remote program, using a connection-oriented transport 

svc_vc_create()

Creates an RPC server handle, using a connection-oriented transport 

clnt_call() 

Client calls a procedure to send a request to the server