TCP/IP Programming Manual
socket
input value; specifies the socket number for the socket, as returned by the call to socket or
socket_nw.
command
input value; specifies the operation to be performed on the socket. Supported operations are
listed in Table 16 (page 199).
arg_ptr
input value; points to the argument for the operation. The pointer type is dependent on the
value of command. See Table 16 (page 199) for a list of the pointer types.
tag
input value; 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
(page 243); the possible errors depend on the value of command. Most of the commands return the
following errors:
An invalid argument was specified.EINVAL
The specified operation cannot be performed by a nonprivileged user.EPERM
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/IPv6
Configuration and Management Manual.
• The following commands (listed in Table 16 (page 199)) can be performed only by applications
whose process access ID is in the SUPER group (user ID 255,nnn):
SIOCSIFADDR**SIOCSIFBRDADDR
SIOCSIFFLAGSSIOCSIFDSTADDR
SIOCDELRT**SIOCADDRT**
SIOCSIFMETRICSIOCSIFNETMASK**
SIOCDARPSIOCSARP
The commands marked with double asterisks (**) can be accessed using the DSM commands
as follows:
Can be accessed through the ZIP-ADDR attribute of the ZCOM-OBJ-SUBNET type by
using the programmatic ALTER command (ZCOM-CMD-ALTER).
SIOCSIFADDR
Can be accessed through the ADD ROUTE command (ZCOM-CMD-ADD for the
ZCOM-OBJ-ROUTE object type).
SIOCADDRT
Can be accessed through the DELETE ROUTE command (ZCOM-CMD-DELETE for the
ZCOM-OB-ROUTE object type).
SIOCDELRT
Can be accessed through the ZSUBNET-MASK attribute of the ZCOM-OBJ-SUBNET
type by using the programmatic ALTER command (ZCOM-CMD-ALTER).
SIOCSIFNETMASK
198 Library Routines