Summary of Socket Ioctl Opcodes
Collapse the table of content
Expand the table of content

Summary of Socket Ioctl Opcodes

Some of the socket IOCTL opcodes for Windows Sockets 2 are summarized in the following table. More detailed information is in the Winsock reference on Winsock IOCTLs and the WSPIoctl function. There are other new protocol-specific IOCTL opcodes that can be found in the protocol-specific annex.

A complete list of Winsock IOCTLs are available in the Winsock reference.

OpcodeInput typeOutput typeMeaning
FIONBIOUnsigned long<Not used>Enables or disables nonblocking mode on the socket.
FIONREAD<Not used>Unsigned longDetermines the amount of data that can be read atomically from the socket.
SIOCATMARK<Not used>BOOLDetermines whether or not all OOB data has been read.
SIO_ASSOCIATE_HANDLECompanion 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 structureRetrieves the protocol-specific broadcast address to be used in WSPSendTo.
SIO_GET_QOS<Not used> QOS Retrieves current flow specifications for the socket.
SIO_GET_GROUP_QOS<Not used> QOS Reserved.
SIO_MULTIPOINT_LOOPBACKBOOL<Not used>Controls whether data sent in a multipoint session will also be received by the same socket on the local host.
SIO_MULTICAST_SCOPEint<Not used>Specifies the scope over which multicast transmissions will occur.
SIO_SET_QOS QOS <Not used>Establishes new flow specifications for the socket.
SIO_SET_GROUP_QOS QOS <Not used>Reserved.
SIO_TRANSLATE_HANDLEintCompanion-API dependentObtains 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 Obtains a list of local transport addresses of the socket's protocol family to which the application can bind. The list of addresses varies based on address family and some addresses are excluded from the list.
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>SOCKETObtains socket descriptor of the next provider in the chain on which current socket depends in regards to PnP.


Related topics

Winsock IOCTLs



Community Additions

© 2016 Microsoft