X/Open Transport Interface. The X/Open Transport Interface (XTI) is an Open Group specification for network application programming present in UNIX System V operating systems. It provides OSI transport layer services with protocol independence. Although Open Group considers this specification withdrawn, an implementation is part of the standard programming interfaces on modern UNIX System V operating systems where it is implemented using the STREAMS character input/output mechanism.

Overview
The X/Open Transport Interface is a specification that defines an independent transport-service interface for network applications. Programs using XTI can be run over a variety of transport providers, such as the Transmission Control Protocol (TCP), Xerox Network Systems (XNS), Systems Network Architecture (SNA), X.25, Asynchronous Transfer Mode (ATM) or any other transport layer provider that function at Layer 4 of the OSI Model.

XTI provides similar functionality as the Berkeley sockets interface, however it is protocol independent in contrast to the socket interface which is heavily biased toward the Internet Protocols.  It is based on the UNIX System V Transport Layer Interface (TLI)., which is a transport service definition adhering to the Open Systems Interconnection (OSI) model.
XTI consists of a cooperating STREAMS module, link library application programming interface (API), header files, and the rules and restrictions elaborating how XTI processes work and interact.

Protocol independence
XTI is protocol independent.  However, applications still need to be aware of the desired transport system in order to select it.  Applications can achieve this transport protocol independence using the Network Selection Facilities also provided by the XTI/TLI library (libnsl).

Sockets-to-XTI/TLI equivalents

Although XTI/TLI is similar to the BSD socket interface, neither is included or includes the other one and several 
functions having the same role have different behavior.  Both, the TLI and BSD sockets interfaces in UNIX SVR 3 and SVR 4 operating systems releases  are implemented using the same underlying STREAMS Transport Service Interface.

The following table shows approximate equivalence between the POSIX XTI and sockets interfaces:

To ascertain the proper sequence of library function calls, XTI/TLI uses state indicators, in a similar manner to the sockets API.  However, some socket API functions can be called from multiple states (e.g. sendmsg from unbound state on connectionless socket, connect from unbound state on connection-oriented socket); whereas XTI API functions can only be issued from a specific and corresponding state (e.g. t_bind may only be issued from the unbound state, t_connect only from the bound state).

XTI/TLI Asynchronous Mode
Real-time XTI end user application will use XTI interface asynchronously (otherwise there are no guarantees about how long a call waiting for data will block). The set of functions is the same as synchronous calls but when initializing transport endpoint, O_NONBLOCK parameter is provided. XTI asynchronous mode permits end user application be notified about various events of file handles: connections indications requests, new data, time outs.

XTI refines TLI
XTI refines TLI, providing additional error messages, additional events to manage flow control and simplifies functions parameters (XTI always opens transport endpoints as read-write). Also, XTI checks the value of  to prevent blocking indefinitely when application issue t_listen. Additional utility functions have been added: t_strerror() and t_getprotaddr().

Implementations
The XTI library is found in UNIX System V but also has ports for other systems, such as OpenSS7 for Linux.

Notes

References
 Programming Interfaces Guide - Sun Microsystems, Inc. September 2008

External links
Networking Services (XNS) Issue 5.2, The Open Group, January 2000
Issuer The Issuer of XTI Technical Standard
Introduction to Networking Technologies

Application programming interfaces

ja:Transport Layer Interface