Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
OSS Porting Considerations
Open System Services Porting Guide520573-006
6-3
The poll() Function
The poll() Function
On a UNIX system, the poll() function provides applications with a mechanism for
multiplexing input and output (blocking I/O) over a set of file descriptors. It identifies
those file descriptors on which an application can read or write data, or on which
certain events have occurred. poll() supports regular files, terminal devices, sockets,
STREAMS-based files, FIFOs, and pipes.
If your program calls poll(), you must use the select() function or the Guardian
FILE_COMPLETE_ procedure call instead. The select() function supports only
OSS file descriptors, while the FILE_COMPLETE_ procedure supports both OSS file
descriptors and Guardian file numbers. For more information on the select()
function, refer to the select(2) reference page either online or in the Open System
Services System Calls Reference Manual; for more information on the
FILE_COMPLETE_ procedure, refer to the Guardian Procedure Calls Reference
Manual.
TLI/XTI
The Transport Layer Interface (TLI), as defined in UNIX System V Release 4 (SVR4),
is a transport independent interface that supports many transport interfaces, such as
TCP/IP, OSI TP4, IPX/SPX, and others. X/Open specifies XTI, with some minor
enhancements; XTI is a superset of TLI. Both interfaces are similar to the ISO
transport service definition and provide functions similar to those provided by sockets.
Open System Services does not support TLI or XTI. You must use an alternative
approach: for example, rewriting some parts of your code to use Guardian sockets.
The steps used by a sockets interface when listening for incoming calls and
establishing transactions are very similar to TLI or XTI, but the routines use different
semantics. Thus, it is not difficult to modify a program that uses TLI/XTI to use a
Guardian sockets interface instead.
Using Interprocess Communication (IPC)
Mechanisms
Most versions of UNIX possess many IPC mechanisms. When porting code to the
OSS environment, there is not always a complete correspondence of these IPC
mechanisms and other features.
Table 6-2 on page 6-4 lists the IPC methods available in Open System Services using
only the OSS APIs and the capabilities of each API relevant to communication
between processors and nodes.