Jump to content

X/Open Transport Interface

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Kbrose (talk | contribs) at 20:44, 25 July 2009 (Sockets-to-XTI/TLI equivalents: rephrase and citation would be useful). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 arguable protocol independence. Although Open Group considers this specification obsolete[1], 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.[2]

XTI provides similar functionality as the more widely known Berkeley sockets interface. It is based on the Unix System V Transport Layer Interface (TLI).[3], which is a transport service definition adhering to the Open Systems Interconnection (OSI) model.[4] XTI consists of a link library application programming interface (API), header files, and the rules and restrictions elaborating how XTI processes work and interact.

Protocol independence

Although designed to be protocol independent, applications still need to be aware of the desired transport system in order to select it, and therefore it is not a transport layer transparent access mode[5].

Comparison to sockets interface

The main differences between XTI/TLI and sockets interfaces are related to transport independence:

  • Privileged ports – The notion of privileged ports is not supported in the transport-independent environment. These ports are not portable as they are a convention of BSD sockets implementation within the TCP/IP transport protocols.
  • Opaque addresses – Separating the portion of an address that names a host from the portion of an address that designates the service type at that host address cannot be accomplished in a transport-independent fashion.
  • Broadcast – No transport-independent form of broadcast address exists. Transport options are usually tied to a specific transport.

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[6] and SVR 4[7] 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:

XTI/TLI interface Socket interface Same Semantic
t_open socket yes
- socketpair -
t_bind bind t_bind can bind one protocol address to more than one transport end point; Also t_bind sets the queue depth while for sockets this is done in listen call
t_getinfo t_optmgmt getsockopt getsockopt setsockopt no, t_getinfo/t_optmgmt gets/sets only transport layer options
t_unbind - -
t_close close yes
t_getstate - -
t_sync - -
t_alloc - -
t_free - -
t_look - the same as getsockopt with SO_ERROR
t_error perror yes
t_connect connect t_bind is needed before t_connect
t_rcvconnect - -
t_listen listen listen will set the queue depth
t_accept accept t_accept doesn't block because it is issued after connection indication is received. accept, on the other hand is issued in anticipation of a connect request and therefore may block until the connect request occurs.
t_snd send sendto sendmsg yes
t_rcv recv recvfrom recvmsg yes
t_snddis shutdown after issuing t_snddis a program can continue to listen for requests or reestablish connection with t_connect function, while shutdown frees system allocated resources. To continue communication a new connection needs to be established - issue again socket and bind
t_rcvdis - -
t_sndrel - -
t_rcvrel - -
t_sndudata sendto yes
t_rcvudata recvmsg yes
t_rcvuderr - -
read, write read, write XTI/TLI needs to push tirdwr module before calling read/write functions

In order to ascertain the proper sequence of library function calls, XTI/TLI uses state indicators, in a similar manner to the sockets API. However, XTI/TLI states are mutual exclusive, whereas socket states are not.[citation needed]

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 qlen to prevent blocking indefinitely when application issue t_listen. Additional utility functions have been added: t_strerr() 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

  1. ^ (XNS & 5.2)
  2. ^ (XNS & 5)
  3. ^ (Stevens 1994, pp. 17–18)
  4. ^ (Goodheart 1994, pp. 519)
  5. ^ Introduction to Networking Technologies
  6. ^ (Waite 1987, pp. 295–304)
  7. ^ (Goodheart 1994, p. 519)

References

  • Programming Interfaces Guide - Sun Microsystems, Inc. September 2008
  • Goodheart, Berny (1994). The magic garden explained: the internals of UNIX System V Release 4. Englewood Cliffs, N.J.: Prentice-Hall. ISBN 013 098138 9.
  • Networking Services (XNS) Issue 5, CAE Specification, vol. XNS, Berkshire, U.K.: The Open Group, February 1997, ISBN 1-85912-165-9
  • Networking Services (XNS) Issue 5.2, CAE Specification, vol. XNS, Berkshire, U.K.: The Open Group, January 2000
  • Rago, S. A. (1993). UNIX System V Network Programming. Reading, Mass.: Addison-Wesley.
  • Stevens, W. Richard (1990). UNIX Network Programming. Englewood Cliffs, N.J.: Prentice-Hall.
  • Stevens, W. Richard (1994). TCP/IP Illustrated: the protocols. Reading, Mass.: Addison-Wesley. ISBN 0-201-63346-9.
  • Waite, Mitchell (1987). UNIX Papers for UNIX Developers and Power Users. Indianapolis: Howard W. Sams & Company. ISBN 0-672-22578-6.