DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with the X/Open Transport Interface (XTI)

Connection-mode service

The connection-mode transport service is characterized by four phases:

Local management

The local management phase defines local operations between a transport user and a transport provider. For example, a user must establish a channel of communication with the transport provider, as illustrated in ``Channel between user and provider''. Each channel between a transport user and transport provider is a unique endpoint of communication, and will be called the transport endpoint. The t_open(3xti) routine enables a user to choose a particular transport provider that will supply the connection-mode services, and establishes the transport endpoint.

Channel between user and provider

Another necessary local function for each user is to establish an identity with the transport provider. Each user is identified by a transport address. More accurately, a transport address is associated with each transport endpoint, and one user process may manage several transport endpoints. In connection-mode service, one user requests a connection to another user by specifying that user's address. The structure of a transport address is defined by the address space of the transport provider. An address may be as simple as a random character string (for example, ``file_server''), or as complex as an encoded bit pattern that specifies all information needed to route data through a network. Each transport provider defines its own mechanism for identifying users. Addresses may be assigned to each transport endpoint by t_bind(3xti).

In addition to t_open and t_bind, several routines are available to support local operations. ``Local management routines of the Transport Interface'' summarizes all local management routines of the Transport Interface.

Local management routines of the Transport Interface

Command Description
t_alloc Allocates Transport Interface data structures
t_bind Binds a transport address to a transport endpoint
t_close Closes a transport endpoint
t_error Prints a Transport Interface error message
t_free Frees structures allocated using t_alloc
t_getinfo Returns a set of parameters associated with a particular transport provider
t_getprotaddr Gets protocol addresses for both the local and remote transport endpoints
t_getstate Returns the state of a transport endpoint
t_look Returns the current event on a transport endpoint
t_open Establishes a transport endpoint connected to a chosen transport provider
t_optmgmt Negotiates protocol-specific options with the transport provider
t_strerror Returns a pointer to a language-dependent Transport Interface error message string
t_sync Synchronizes a transport endpoint with the transport provider
t_unbind Unbinds a transport address from a transport endpoint

Connection establishment

The connection establishment phase enables two users to create a connection, or virtual circuit, between them, as demonstrated in ``Transport connection''.

Transport connection

This phase is illustrated by a client-server relationship between two transport users. One user, the server, typically advertises some service to a group of users, and then listens for requests from those users. As each client requires the service, it attempts to connect itself to the server using the server's advertised transport address. The client uses the t_connect(3xti) routine to initiate the connect request. One argument to t_connect, the transport address, identifies the server the client wishes to access. The server is notified of each incoming request using t_listen(3xti), and may call t_accept(3xti) to accept the client's request for access to the service. If the request is accepted, the transport connection is established.

``Routines for establishing a transport connection'' summarizes all routines available for establishing a transport connection.

Routines for establishing a transport connection

Command Description
t_accept Accepts a request for a transport connection (server routine)
t_connect Establishes a connection with the transport user at a specified destination (client routine)
t_listen Retrieves an indication of a connect request from another transport user (server routine)
t_rcvconnect Completes connection establishment if t_connect was called in asynchronous mode (server routine) (See ``Advanced topics''.)

Data transfer

The data transfer phase enables users to transfer data in both directions over an established connection. Two routines, t_snd(3xti) and t_rcv(3xti), send and receive data over this connection. All data sent by a user is guaranteed to be delivered to the user on the other end of the connection in the order in which it was sent. ``Connection mode data transfer routines'' summarizes the connection mode data transfer routines.

Connection mode data transfer routines

Command Description
t_rcv Retrieves data that has arrived over a transport connection
t_snd Sends data over an established transport connection

Connection release

The connection release phase allows you to break an established connection. When you decide that a conversation should end, you can request that the provider release the transport connection. Two types of connection release are supported by the Transport Interface. The first is an abortive release, which directs the transport provider to release the connection immediately. Any previously sent data that has not yet reached the other transport user may be discarded by the transport provider. The t_snddis(3xti) routine initiates this abortive disconnect, and t_rcvdis(3xti) processes the incoming indication for an abortive disconnect.

All transport providers must support the abortive release procedure. In addition, some transport providers may also support an orderly release facility that enables users to terminate communication gracefully with no data loss. The functions t_sndrel(3xti) and t_rcvrel(3xti) support this capability. ``Connection release routines'' summarizes the connection release routines.

Connection release routines

Command Description
t_rcvdis Returns an indication of an aborted connection, including a reason code and user data
t_rcvrel Returns an indication that the remote user has requested an orderly release of a connection
t_snddis Aborts a connection or rejects a connect request
t_sndrel Requests the orderly release of a connection


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004