• Keine Ergebnisse gefunden

Network Communications

Im Dokument Cartridge Syste·m (Seite 138-141)

Data Stream Representation

The data stream representation supported for the CSI is XDR. The XDR fonnat for data is a host-independent serial byte stream. All data transmitted across the network is serialized to XDR fonnat,

transmitted, and then deserialized on the receiving end. See CSI Message Processing in this chapter for descriptions of the XDR translation routines.

The only portion of a message going to or from the NI that the CSI interprets is the CSI_HEADER. The CSI does, however, parse all infonnation in a message as part of the serializationldeserialization process.

Session Connection

Communications services are solely for connection and data transfer.

These two operations are encapsulated into a single, brief operation; a connection is closed immediately after data transfer is complete. This design is necessary because of the following constraints:

• Network interruptions. With current technology, network service tends to be interrupted periodically. When this happens the

network connections are no longer valid. Limiting connection time reduces the chances of losing a connection.

• Limited number offile descriptors that can be held at one time.

Maintenance of a TCP/IP connection on UNIX systems requires holding one or more open file descriptors. Limiting the time that connections are held reduces the chances of running out of available file descriptors.

CSI Processes Communications Methodology RPC Service Registration

Within the callback model, both a primary client-server relationship and a temporarily inverted client-server relationship are defined. The primary relationship exists when the SSI requests tape services of the ACSLM via the CSI:

The SSI functions as primary client when it makes RPC calls to transmit requests to the CSI.

The CSI functions as primary server when it receives and processes the requests and passes them to the ACSLM.

This relationship is inverted, however, when responses are transmitted:

Effectively, the CSI briefly functions as a client when it makes an RPC callback to the SSI.

The SSI has a role as a secondary server in order to receive the callback.

Since both the CSI and SSI have server roles, they must each register as RPC servers at initiation. Client SSIs must interface with the RPC layer of the CSI. The descriptions below will clarify some of the processes documented in the Sun Network Programming Manual.

RPC Program Numbers and Port Mappings

A port mapping uniquely identifies a logical path that RPC uses in executing a remote function. The port mapping is initialized by making RPC calls to the RPC portmapper program. Each RPC procedure is identified by:

A unique program number, used to interrelate various procedures (function calls) that are remotely executed.

One or more version numbers, assigned to each program number so that the program number does not need to change when the service is changed.

A procedure number.

In order to program the call for a particular remote procedure, the programmer looks up these numbers in a published list, and codes them as is appropriate on the function call interface. The Sun Network Programming Manual ("Remote Procedure Call Programming Guide";

"Higher Layers of RPC", "Assigning Program Numbers") defines the following categories of program numbers:

Sun-Defined Program Numbers. Sun-defined program numbers

Communications Methodology CSI Processes Ultimately, the CSI program number will be derived from within this range by Sun, after StorageTek applies for a program number for the Storage Server product. It is not yet known when the CSI will begin using a Sun-registered program number.

User-Defined Program Numbers. Until Sun-registered program numbers are employed, StorageTek will use user-defined program numbers for the CSI. Permanent CSI service program numbers should exist in the following range:

Ox20000000-0x3fffffff

The program number currently used for the CSI is defined in csi. h

as CS I _PROGRAM. See Appendix D for a listing of the csi . h header fue.

The SSI callback service could register within this range, but this might limit the number of SSls that could run on a single host.

Transient Program Numbers. Transient, or temporary, program numbers are primarily intended to exist only for the life of a particular execution of an application, barring a software error that prevents their deletion from the portmapper. These numbers should be dynamically assigned at program startup time, and unmapped with the port-mapper upon program shutdown. The SSI should use this category of program. numbers.

The transient program number is passed in the program variable in the CSI_HANDLE_RPC structure. See the Input to the CSI From the SSI section in Chapter 7 for the format and content of this structure.

The range of transient program numbers is:

Ox40000000-0xSfffffff

The gettransient () function, which is shown in Figure 6-4, can be used to obtain the mapping.

CSI Registration

The CSI is the primary server; therefore it registers as the primary server at a permanent, advertised port/program number. It registers by calling the svc_register () RPC function; the parameters and values passed, as defined in the csi. h header file, are as follows.

• The transport handle:

xprt

• The program number of the CSI server:

.define CSI PROGRAM Ox200000fe

• The version number of the CSI:

.define CSI UDP VERSION 1

CSI Processes CSllnltiation

• A procedural dispatching routine:

'define CSI_ACSLM_PROC 1000

• A parameter that respecifies this as a TCPIIP or UDPIIP based service:

IPPROTO TCP IPPROTO UDP

551 Registration

CSIINITIATION

Im Dokument Cartridge Syste·m (Seite 138-141)