IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-64
socket_ioctl, socket_ioctl_nw
arg_ptr
points to the argument for the operation. The pointer type is dependent on the
value of command. For a list of the pointer types, see Table 5-3.
tag
is the tag parameter to be used for the nowait operation initiated by
socket_ioctl_nw.
Errors
If an error occurs, the external variable errno is set to one of the errors listed in
Appendix B, “Socket Errors”; the possible errors depend on the value of command.
Most of the commands return the following errors:
Usage Guidelines
•
Use socket_ioctl on a socket created for waited operations, and
socket_ioctl_nw on a socket created for nowait operations. The operation
initiated by socket_ioctl_nw must be completed with a call to the AWAITIOX
procedure.
•
In general, socket_ioctl and socket_ioctl_nw control operations are
provided for compatibility only. To alter network parameters or to determine their
values, it is recommended that you use the Distributed Systems Management
(DSM) ADD, ALTER, DELETE, and INFO commands. The interactive versions of
these commands are described in the TCP/IP Configuration and Management
Manual, and the programmatic versions are described in the TCP/IP Management
Programming Manual.
•
Note the FIONBIO command is not supported. If this command is selected, the
EINVAL error is returned.
•
If you select FIONREAD for UDP sockets, note that the number of characters
returned is greater than the number of characters received as a result of a call to
the recv or recvfrom functions; the increase in characters is equal to
sizeof (struct sockaddr_in). The additional characters are returned
because the network keeps the sender’s socket address at the beginning of the
data until the application requests the data.
•
UDP, IPX, SPX, and SPXII do not support out-of-band data. Use of the command
argument SIOCATMARK is meaningless for UDP, IPX, SPX, and SPXII, although
specifying SIOCATMARK does not cause the call to fail.
•
The SIOCSIFFLAGS function is now disabled. The call will complete successfully
but no flags will be changed.
EINVAL An invalid argument was specified.
EPERM The specified operation cannot be performed by a
nonprivileged user.