ONC RPC naming and routing

Remote procedures in ONC RPC are identified by the 3-tuple: program number, version number, and procedure number.

It is usual to package several related procedures together into a single program. When changes are made to the procedures, a new version of the program is created, but the new version usually contains the same procedure numbers as the previous version.

Procedure zero

Users define procedure numbers for each program, conventionally starting at 1 and proceeding in sequence. Procedure 0 is usually defined as a procedure with no parameters and no processing that returns an empty reply. This is useful for clients, who can call procedure 0 to see if a particular service exists and to test performance on a null call.

Registration and the Portmapper

Servers on a host need to let clients know their logical addresses and which services they offer. In ONC RPC, servers generally do this by registering with a utility service called the Portmapper. This maintains a list of mappings from program/version numbers (also qualified by protocol used) to TCP/IP port numbers on a host.

The Portmapper itself can always be located by clients because it is always on well-known port 111 on a given host. If using low-level calls, the client first asks the Portmapper for the port number for the particular remote procedure, and then calls that port directly. The high-level call, callrpc, performs the same function transparently to the user.

CICS® ONC RPC

Registration is done by CICS ONC RPC automatically, or under operator control.

Routing

Before calling a procedure, a client asks the Portmapper at the host for the port number of the program and version that the client wishes to call. (The protocol is determined when the connection between TCP/IP systems is set up.) In the remote procedure call, the client supplies only the IP address, port number, and procedure number. Figure 33 shows how the IP address, port number, and procedure number identify the server procedure.

Figure 33. TCP/IP and RPC routing
 Diagram showing that the program number can be found from the Port number .

Types of remote procedure call

Synchronous
This is the normal method of operation. The client makes a call and does not continue until the server returns the reply.
Nonblocking
The client makes a call and continues with its own processing. The server does not reply.
Batching
This is a facility for sending several client nonblocking calls in one batch.
Broadcast RPC
RPC clients have a broadcast facility, that is, they can send messages to many servers and then receive all the consequent replies.
Callback RPC
The client makes a nonblocking client/server call, and the server signals completion by calling a procedure associated with the client.
CICS ONC RPC

CICS ONC RPC cannot support callback RPC, because callback requires that both ends contain both client and server procedures.

Related concepts
ONC RPC concepts
ONC RPC facilities
Related tasks
Setting up CICS ONC RPC
[[ Contents Previous Page | Next Page Index ]]