Platform SDK: Windows Sockets

Summary of Socket Ioctl Opcodes

The socket IOCTL opcodes for Windows Sockets 2 are summarized in the following table. More detailed information is provided in section 4 under WSPIoctl. There are other new protocol-specific IOCTL opcodes that can be found in the protocol-specific annex.

Opcode Input type Output type Meaning
FIONBIO Unsigned long <Not used> Enables or disables nonblocking mode on the socket.
FIONREAD <Not used> Unsigned long Determines the amount of data that can be read atomically from the socket.
SIOCATMARK <Not used> BOOL Determines whether or not all OOB data has been read.
SIO_ASSOCIATE_HANDLE Companion API dependent <Not used> Associates the socket with the specified handle of a companion interface.
SIO_ENABLE_CIRCULAR
_QUEUEING
<Not used> <Not used> Enables circular queuing.
SIO_FIND_ROUTE SOCKADDR structure <Not used> Requests the route to the specified address to be discovered.
SIO_FLUSH <Not used> <Not used> Discards current contents of the sending queue.
SIO_GET_BROADCAST
_ADDRESS
<Not used> SOCKADDR structure Retrieves the protocol-specific broadcast address to be used in WSPSendTo.
SIO_GET_QOS <Not used> QOS Retrieves current flow specification(s) for the socket.
SIO_GET_GROUP_QOS <Not used> QOS Reserved.
SIO_MULTIPOINT
_LOOKBACK
BOOL <Not used> Controls whether data sent in a multipoint session will also be received by the same socket on the local host.
SIO_MULTICAST_SCOPE int <Not used> Specifies the scope over which multicast transmissions will occur.
SIO_SET_QOS QOS <Not used> Establishes new flow specification(s) for the socket.
SIO_SET_GROUP_QOS QOS <Not used> Reserved.
SIO_TRANSLATE_HANDLE int Companion-API dependent Obtains a corresponding handle for socket s that is valid in the context of a companion interface.
SIO_ROUTING_INTERFACE_QUERY SOCKADDR SOCKADDR Obtains the address of the local interface that should be used to send to the specified address.
SIO_ROUTING_INTERFACE_CHANGE SOCKADDR <Not used> Requests notification of changes in information reported through SIO_ROUTING_INTERFACE_QUERY for the specified address.
SIO_ADDRESS_LIST_QUERY <Not used> SOCKET_ADDRESS_LIST Obtains the list of addresses to which the application can bind.
SIO_ADDRESS_LIST_CHANGE <Not used> <Not used> Requests notification of changes in information reported through SIO_ADDRESS_LIST_QUERY
SIO_QUERY_PNP_TARGET_HANDLE <Not used> SOCKET Obtains socket descriptor of the next provider in the chain on which current socket depends in regards to PnP.