Go to main content

Oracle® Solaris 11.3 Programming Interfaces Guide

Exit Print View

Updated: April 2019
 
 

What Are XTI and TLI?

TLI was introduced with AT&T System V, Release 3 in 1986. TLI provided a transport layer interface API. TLI is based on the ISO Transport Service Definition model. TLI provides an API between the OSI transport and session layers. The TLI interfaces evolved further in AT&T System V, Release 4 version of UNIX and were also available in the Solaris 5.6 operating system interfaces.


Note -  The interfaces described in this chapter are multithread safe. This means that applications containing the XTI/TLI interface calls can be used in a multithreaded application. Because these interface calls are not re-entrant, they do not provide linear scalability.

Caution

Caution  -  The XTI/TLI interface behavior has not been well specified in an asynchronous environment. Do not use these interfaces from signal handler routines.


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. New applications can use the XTI interfaces and you can port older applications to XTI when necessary.

TLI is implemented as a set of interface calls in a library libnsl, to 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 about compiling with XTI, see the standards(5) man page.


Note -  An application using the XTI interface includes the xti.h header file, whereas an application using the TLI interface includes the tiuser.h header file.

The XTI/TLI code can be independent of current transport providers when used in conjunction with some additional interfaces and mechanisms described in Locality Group APIs. The Solaris 5 product includes some transport providers such as TCP, as part of the base operating system. A transport provider performs services and the transport user requests the services. The transport user issue service requests to the transport provider. An example is a request to transfer data over a TCP and UDP connection.

    XTI/TLI can also be used for transport-independent programming by taking advantage of two components:

  • Library routines that perform the transport services such as transport selection and name-to-address translation. The network services library includes a set of interfaces that implement XTI/TLI for user processes. See Transport Selection and Name-to-Address Mapping.

    Programs using TLI should be linked with the libnsl network services library by specifying the –-l nsl option at compile time.

    Programs using XTI should be linked with the xnet library by specifying the –-l xnet option at compile time.

  • State transition rules that define the sequence in which the transport routines can be invoked. For more information about state transition rules, see 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 and provider-generated event indications. XTI/TLI programmers should understand all state transitions before using the interface.