TLI was introduced with AT&T's System V, Release 3 in 1986. It provided a transport layer interface API. TLI was modeled after the ISO Transport Service Definition and provides an API between the OSI transport and session layers. TLI interfaces evolved further in AT&T System V, Release 4 version of Unix and were made available in release of SunOS 5.X operating system interfaces too.
XTI interfaces are an evolution of TLI interfaces and represents the future direction of this family of interfcaces. Compatibility for applications using TLI interfaces is available. There is no intrinsic need to immediate port TLI applications to XTI. New applications can use the XTI interface and older applications can be ported to XTI when necessary.
XTI/TLI are implemented as a set of function calls in a library (libnsl) to which the applications link.
An application using the XTI interface uses the xti.h header file, whereas an application using the TLI interface includes the tiuser.h header file.
Intrinsic to XTI/TLI are the notions of transport endpoints and a transport provider. The transport endpoints are two entities that are communicating, and the transport provider is the set of routines on the computer host that provides the underlying communication support. XTI/TLI is the interface to the transport provider, not the provider itself. See Figure 3-1.
XTI/TLI code can be written to be independent of transport providers in use in conjunction with some additional interfaces and mechanisms described in Chapter 4. The SunOS 5.x product includes some transport providers (TCP, for example) as part of the base operating system. A transport provider performs services, and the transport user requests the services. The transport user issues service requests to the transport provider. An example is a request to transfer data over a connection TCP and UDP.
XTI/TLI can also be used for transport-independent programming. XTI/TLI has two components to achieve this:
Library routines that perform the transport services, in particular, transport selection and name-to-address translation. The network services library includes a set of functions that implement XTI/TLI for user processes. See Chapter 4, Transport Selection and Name-to-Address Mapping.
Programs using XTI/TLI should be linked with the network services library, lnsl, as follows:
cc prog.c -lnsl |
State transition rules that define the sequence in which the transport routines may be invoked. For more information on state transition rules, see section, "State Transitions". The state tables define the legal sequence of library calls based on the state and the handling of events. These events include user-generated library calls, as well as provider-generated event indications. XTI/TLI programmers should understand all state transitions before using the interface.
XTI/TLI provides two modes of service, connection mode and connectionless mode. The next two sections give an overview of these modes.