IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-55
socket, socket_nw
socket_type
specifies the semantics of communication. It must be one of the following values:
protocol
TCP/IP: protocol is the specific IP number. This parameter must be specified if
socket_type is SOCK_RAW; it is ignored if socket_type is SOCK_STREAM or
SOCK_DGRAM.
If socket_type is SOCK_RAW, the value of protocol cannot be the number
assigned to ICMP (1), TCP (6), or UDP (17). The application must provide support
for the specified protocol.
flags
is specified in the format of the flags parameter for the FILE_OPEN_()
procedure, as described in the Guardian Procedure Calls Reference Manual.
The following considerations apply to this parameter:
The FILE_OPEN_() procedure has no FLAGS parameter. The sockets library
no longer calls the OPEN() procedure. Instead, it calls the FILE_OPEN_()
procedure. The function sockets_nw() will internally map the old FLAGS
parameter to the corresponding parameters for the FILE_OPEN_().
The flags parameter is not used for the socket function (waited operations).
If a nowaited file_open on a socket_nw call is specified
((flags & 0200)!=0), the following apply:
The socket_nw call must be completed with a call to AWAITIOX.
The tag returned by AWAITIOX has the value -30D.
After the call to AWAITIOX is completed, SETMODE 30 must be used to
allow I/O operations to complete in any order.
To create a socket where nowait operations can be performed, the flags
parameter of the socket_nw call must be set to allow nowait operations
((flags & 017)!=0).
If a nowait socket is specified—if ((flags & 017)!=0) is true—then the
following considerations apply:
SOCK_STREAM Create a socket (either TCP or SPXII).
SOCK_DGRAM Create a socket (either UDP or IPX).
SOCK_RAW Create a raw socket for access to the raw IP
protocol level. To create a raw socket, the process
access ID of the requesting application must be in
the SUPER group (user ID 255,nnn).