XTI and TLI
XTI is derived from TLI, which was first
introduced with System V Release 3.0 of UNIX in 1986.
Both XTI and TLI
are Application Program Interfaces (APIs) that allow
user processes to access transport providers in a (mostly)
transport-independent fashion.
From the standpoint of syntax and semantics, the two libraries are
nearly identical. The name of the header file used for TLI
is tiuser.h. The syntax of the include preprocessor directive
to use is
#include <sys/tiuser.h>
The name of the library to
be searched when compiling and linking a program that uses
TLI is nsl (Network Services Library).
The syntax of the cc command to use is
cc option file -lnsl
Applications written to use TLI can
be ported relatively easily to XTI.
You should note the points listed below
when porting your application.
-
The T_ERROR event is not defined in XTI.
Consequently, t_look never returns this event as
its result value.
-
XTI defines the events T_GODATA
and T_GOEXDATA to assist in managing flow control.
TLI does not define these events,
so a process written to use TLI must
continue to try sending data until it is successful.
When porting your application to XTI, you can redesign
it to either call t_look or be event-driven.
-
More of the XTI functions can return the
TOUTSTATE error than in TLI.
-
The flags O_RDONLY and O_WRONLY
are not defined in XTI.
You must change them to O_RDWR.
The CAE Specification has more information on
the differences between XTI and TLI.
Next topic:
XTI and sockets
Previous topic:
Compiling and linking with XTI
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003