Skip Navigation Links | |
Exit Print View | |
Programming Interfaces Guide Oracle Solaris 11.1 Information Library |
2. Session Description Protocol API
8. Programming With XTI and TLI
Advanced XTI/TLI Programming Example
Asynchronous Connectionless-Mode Service
Making the Endpoint Asynchronous
Asynchronous Network Transfers
Asynchronous Connection-Mode Service
Asynchronously Establishing a Connection
Asynchronous Use of a Connection
Transferring a File Descriptor
XTI/TLI Versus Socket Interfaces
Additions to the XTI Interface
10. Transport Selection and Name-to-Address Mapping
11. Real-time Programming and Administration
The set of XTI/TLI services, common to many transport protocols, offers protocol independence to applications. Not all transport protocols support all XTI/TLI services. If software must run in a variety of protocol environments, use only the common services.
The following is a list of services that might not be common to all transport protocols.
In connection mode service, a transport service data unit (TSDU) might not be supported by all transport providers. Make no assumptions about preserving logical data boundaries across a connection.
Protocol and implementation-specific service limits are returned by the t_open(3NSL) and t_getinfo(3NSL) routines. Use these limits to allocate buffers to store protocol-specific transport addresses and options.
Do not send user data with connect requests or disconnect requests, such as t_connect(3NSL) and t_snddis(3NSL). Not all transport protocols can use this method.
The buffers in the t_call structure used for t_listen(3NSL) must be large enough to hold any data sent by the client during connection establishment. Use the T_ALL argument to t_alloc(3NSL) to set maximum buffer sizes to store the address, options, and user data for the current transport provider.
Do not specify a protocol address on t_bind(3NSL) on a client-side endpoint. The transport provider should assign an appropriate address to the transport endpoint. A server should retrieve its address for t_bind(3NSL) in a way that does not require knowledge of the transport provider's name space.
Do not make assumptions about formats of transport addresses. Transport addresses should not be constants in a program. Chapter 10, Transport Selection and Name-to-Address Mapping contains detailed information about transport selection.
The reason codes associated with t_rcvdis(3NSL) are protocol-dependent. Do not interpret these reason codes if protocol independence is important.
The t_rcvuderr(3NSL) error codes are protocol dependent. Do not interpret these error codes if protocol independence is a concern.
Do not code the names of devices into programs. The device node identifies a particular transport provider and is not protocol independent. See Chapter 10, Transport Selection and Name-to-Address Mapping for details regarding transport selection.
Do not use the optional orderly release facility of the connection mode service, provided by t_sndrel(3NSL) and t_rcvrel(3NSL), in programs targeted for multiple protocol environments. This facility is not supported by all connection-based transport protocols. Using the facility can prevent programs from successfully communicating with open systems.