IPX/SPX Programming Manual

Programming Using the Socket Interface
HP NonStop IPX/SPX Programming Manual528022-001
3-3
Differences Between UNIX and HP Implementations
Differences Between UNIX and HP Implementations
The HP socket routines also differ from the 4.3 BSD UNIX socket routines in the
following ways:
The select routine is not supported. Instead, use the nowait I/O capability to test
I/O completion by issuing the AWAITIO[X] call on specific sockets.
Include files are in either the $SYSTEM.ZTCPIP or $SYSTEM.ZIPXPRO
subvolume, rather than in the /usr/include directory.
The I/O Control operations available for sockets are restricted. Although most of
the socket I/O Control operations are available, SIOCGIFCONF and FIONBIO are
not supported. Those I/O Control operations available are accessed through the
socket_ioctl function. For a complete list of the I/O Control operations
supported, see Table 5-3.
Because of differences between the UNIX and NonStop Kernel I/O environments,
some differences exist in the errors returned in errno by the socket routines.
Although errors with the same names are compatible, some error numbers do not
match those returned by UNIX implementations. Programs that refer to errors by
number rather than by name require a greater conversion effort.
In particular, those socket errors that represent UNIX operating system-dependent
errors are not returned, and NonStop Kernel file system errors can be returned. For
details, see Appendix B, Socket Errors.
Sockets can be closed or removed only by calling the file-system procedures
FILE_CLOSE or CLOSE.
File control capability provided by the UNIX fcntl system call is not supported.
The functions recv[from]_nw and t_recvfrom_nw require the use of the
AWAITIOX procedure to determine the number of characters read.
The function send[to]_nw requires the use of the AWAITIOX procedure to
determine the number of characters sent. If the amount of data sent is less than
the length of the message, issue another pair of send_nw and AWAITIOX calls.
To determine the number of characters sent through a call to send_nw or
t_sendto_nw, you can alternatively look at nb_sent, which is the first parameter
of struct send_nw_str. For information on this structure, see the description of
the send_nw routine in Section 5, Library Routines
.
The HP implementation of database support routines such as gethostbyaddr
and gethostbyname are all waited calls.
NonStop IPX/SPX does not support out-of-band urgent data.