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

Table Of Contents
Porting or Migrating Sockets Applications
Open System Services Porting Guide520573-006
11-5
Differences Between OSS Sockets and Guardian
Sockets
Differences Between OSS Sockets and Guardian Sockets
If you have been using Guardian sockets, you should be aware of the differences
between the Guardian implementation and the OSS implementation.
Guardian processes cannot receive the SIGWINCH signal. OSS processes support
this signal.
Guardian sockets use Guardian file numbers; therefore, Guardian system
procedures such as AWAITIOX, FILE_CLOSE_, FILE_COMPLETION_, and
FILE_GETINFO_ can be used on Guardian sockets.
OSS sockets use OSS file descriptors; therefore, functions such as fstat() and
close() can be used on OSS sockets.
Guardian system procedures cannot be used on OSS file descriptors.
Guardian sockets are not inherited by child processes; therefore, a Guardian
application needs to call the accept_nw2() function when passing a client
connection from parent to child.
In an OSS sockets application, file descriptors are inherited by the child process;
therefore, no special function call is needed to pass a connection.
OSS sockets header files are in the same location as on XPG4-compliant UNIX
systems. Table 11-1 lists Guardian header filenames and their corresponding
names in the OSS environment.
In the Guardian environment, the LISTNER process must be used to activate
servers. The OSS environment supports the use of inetd to spawn server
processes.
Table 11-1. Sockets Header Filenames
Guardian Header Filename
(in $SYSTEM.ZTCPIP)
OSS Header Filename
(in /usr/include)
IFH
<netinet/if.h>
INH
<netinet/in.h>
IN6H
<netinet/in6.h>
IOCTLH
<sys/ioctl.h>
MBUFH
<netinet/mbuf.h>
NETDBH
<netdb.h>
ROUTEH
<netinet/route.h>
SOCKETH
<sys/socket.h>
TYPESH
<sys/types.h>