Transport Service Library Interface Overview

Network applications that are either system-provided or developed in-house require a programming interface to the network, such as Transmission Control Protocol/Internet Protocol (TCP/IP).

The transport level programming interface provides application developers a means of getting to the network protocols without requiring the knowledge of protocol-specific semantics, the framework which the protocols are loaded or the complexity of kernel interfaces.

Two libraries are provided for accessing well-known protocols such as TCP/IP. These libraries are:
  • Transport Library Interface (TLI)
  • X/OPEN Transport Library Interface (XTI)
These library interfaces are provided in addition to the existing socket system calls. Generally speaking, well-known protocols, such as TCP/IP and Open Systems Interconnection (OSI), are divided into two parts:
  • Transport layer and below are in the kernel space
  • Session layer and above services are in the user space.

The operating system supplies the socket-based TCP/IP protocol suites as a part of the base system. It also supplies the socket system calls and socket library calls (libc.a) for the existing applications which have been developed using the sockets applications programming interface (API).

TLI is a library that is used for porting applications developed using the AT&T System V-based UNIX operating systems.

XTI is a library implementation, as specified by X/OPEN CAE Specification of X/Open Transport Interface and fully conformant to X/OPEN XPG4 Common Application Environment (CAE) specification, that defines a set of transport-level services that are independent of any specific transport provider's protocol or its framework.

The purpose of XTI is to provide a universal programming interface for the transport layer functions regardless of the transport layer protocols, how the framework of the transport layer protocols are implemented, or the type of UNIX operating system. For example, an application which writes to XTI should not have to know that the service provider is written using STREAMS or sockets. The application accesses the transport end point (using the returned handle, fd, of the t_open subroutine) and requests and receives indications from the well-known service primitives. If desired or necessary, applications can obtain any protocol-specific information by calls to the t_info subroutine.

Both TLI and XTI are implemented using STREAMS. This implementation includes the following members:
  • Transport Library - libtli.a
  • X/OPEN Transport Library - libxti.a
  • STREAMS driver - Sends STREAMS messages initiated from the XTI or TLI library to the sockets-based network protocol (as in the case of TCP/IP) or to other STREAMS drivers (as in the case of Netware).

The TLI (libtli.a) and XTI (libxti.a) libraries are shared libraries. This means that applications can run without recompiling, even though the system may update the libraries in the future.

The TLI and XTI calls syntax is similar. For the most part, XTI is a superset of TLI in terms of definitions, clarification of usage, and robustness of return codes. For specific XTI usage and return codes, see the X/OPEN CAE Specification of X/Open Transport Interface and subroutines.