Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
NOTE: Although the names $ZPLS and $ZAFN2 are used as transport-provider names,
neither of these are processes that run on the system.
For more information about AF_UNIX Release 2 software and sockets, see the Open System
Services Programmer's Guide.
• The OSS ioctl() function does not conform to a published standard. Refer to the ioctl(2)
reference page either online or in the Open System Services System Calls Reference Manual
for a description of its capabilities.
• Beginning with the H06.24 and J06.13 RVUs, 64-bit OSS socket functions are provided and
if the application being ported uses 64-bit UNIX socket functions, the 64-bit OSS socket
functions might be helpful. For information about 64-bit OSS socket functions, see the 64-Bit
Support in OSS and Guardian chapter in the Open System Services System Programmer's
Guide.
Differences Between OSS Sockets and Berkeley Software Distribution Sockets
The differences between OSS sockets and Berkeley Software Distribution (BSD) sockets are:
• The OSS sockets application program interface (API) is based on BSD 4.3 for AF_INET and
AF_INET6, and BSD 4.3+ for AF_UNIX, with extensions for AF_INET and AF_UNIX based
on the X/Open XPG4 standard. AF_INET6 extensions are based on RFC 2553 Basic Sockets
Interface Extensions for IPv6.
• On UNIX systems older than System V release 4 (SVR4), the sockets functions are normally
found in the library named /usr/lib/libinet.a. On SVR4 and newer UNIX systems, the
functions are found in the library named /usr/lib/libsocket.a.
Two OSS libraries contain additional support functions for AF_INET and AF_INET6 sockets,
as listed in Table 14 (page 184): a shared run-time library (SRL) intended for use by TNS/R
native applications and a static library for use by TNS applications. The SRL is located in
/G/SYSTEM/SYSnn/zinetsrl, and the static library is located in /usr/lib/libinet.a.
• Open System Services provides the following sockets-related functions that are not found on
UNIX systems:
◦ sockatmark(), which determines when a socket is at an out-of-band mark with respect
to its data. Processes can call this function instead of calling the ioctl() function to set
the SIOCATMARK flag.
OSS AF_UNIX sockets do not currently support sockatmark().
◦ socket_transport_name_set(), which an application can call to specify the name
of the transport provider process to use.
◦ socket_transport_name_get(), which an application can call to retrieve the name
of the transport provider process being used.
• OSS sockets can return the following error codes that are not BSD error codes:
Returned when an attempt is made to create a socket without a transport agent
process running on that processor.
ETANOTRUNNING
Returned when an attempt is made to create a socket without a transport provider
process running.
ENOENT
• In the OSS environment, the ECONNRESET error code is returned when an attempt is made
to use a socket whose transport provider process has stopped running.
• OSS sockets use the fcntl() function with the O_NONBLOCK flag to mark a socket as
nonblocking. BSD sockets use the fcntl() function with the FNDELAY flag for this purpose.
Porting UNIX Sockets Applications to the OSS Environment 179