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 SunOS 5.6 operating system interfaces, too.
XTI interfaces are an evolution of TLI interfaces and represent the future direction of this family of interfaces. Compatibility for applications using TLI interfaces is available. There is no intrinsic need to port TLI applications to XTI immediately. New applications can use the XTI interfaces and older applications can be ported to XTI when necessary.
TLI is implemented as a set of function calls in a library (libnsl) with which the applications link. XTI applications are compiled using the c89 front end and must be linked with the xnet library (libxnet). For additional information on compiling with XTI, see standards(5).
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 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 current transport providers in conjunction with some additional interfaces and mechanisms described in Chapter 4. The SunOS 5 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 TLI should be linked with the network services library, libnsl, as follows:
% cc prog.c -lnsl
State transition rules that define the sequence in which the transport routines can 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.