diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c index 8fc1bf2b650..8c0478c8abf 100644 --- a/dlls/winsock/socket.c +++ b/dlls/winsock/socket.c @@ -1812,6 +1812,10 @@ INT WINAPI WSAIoctl (SOCKET s, if (fd == -1) return SOCKET_ERROR; + TRACE("%d, 0x%08lx, %p, %ld, %p, %ld, %p, %p, %p\n", + s, dwIoControlCode, lpvInBuffer, cbInBuffer, lpbOutBuffer, + cbOutBuffer, lpcbBytesReturned, lpOverlapped, lpCompletionRoutine); + switch( dwIoControlCode ) { case SIO_GET_INTERFACE_LIST: @@ -1849,8 +1853,9 @@ INT WINAPI WSAIoctl (SOCKET s, { PIP_ADAPTER_INFO ptr; - if (size > cbOutBuffer) + if (size*sizeof(INTERFACE_INFO)/sizeof(IP_ADAPTER_INFO) > cbOutBuffer) { + WARN("Buffer too small = %lu, cbOutBuffer = %lu\n", size, cbOutBuffer); HeapFree(GetProcessHeap(),0,table); release_sock_fd( s, fd ); WSASetLastError(WSAEFAULT); @@ -1889,6 +1894,8 @@ INT WINAPI WSAIoctl (SOCKET s, intArray->iiFlags |= WS_IFF_LOOPBACK; if (ifInfo.ifr_flags & IFF_UP) intArray->iiFlags |= WS_IFF_UP; + if (ifInfo.ifr_flags & IFF_MULTICAST) + intArray->iiFlags |= WS_IFF_MULTICAST; } addr = inet_addr(ptr->IpAddressList.IpAddress.String); @@ -1938,6 +1945,12 @@ INT WINAPI WSAIoctl (SOCKET s, break; } + case SIO_ADDRESS_LIST_CHANGE: + FIXME("-> SIO_ADDRESS_LIST_CHANGE request: stub\n"); + /* FIXME: error and return code depend on whether socket was created + * with WSA_FLAG_OVERLAPPED, but there is no easy way to get this */ + break; + default: WARN("\tunsupported WS_IOCTL cmd (%08lx)\n", dwIoControlCode); release_sock_fd( s, fd ); diff --git a/include/winsock2.h b/include/winsock2.h index 0e4c32f280c..a14b19cc644 100644 --- a/include/winsock2.h +++ b/include/winsock2.h @@ -117,6 +117,7 @@ extern "C" { #define IOC_WS2 0x08000000 #define IOC_PROTOCOL 0x10000000 #define IOC_VENDOR 0x18000000 +#define IOC_VOID 0x20000000 #define _WSAIO(x,y) (IOC_VOID|(x)|(y)) #define _WSAIOR(x,y) (IOC_OUT|(x)|(y)) #define _WSAIOW(x,y) (IOC_IN|(x)|(y))