Zebediah Figura : ws2_32: Translate SIO_ADDRESS_LIST_CHANGE into a proper NT ioctl.
Alexandre Julliard
julliard at winehq.org
Fri Sep 25 14:52:53 CDT 2020
Module: wine
Branch: master
Commit: c6806e3f204413294bd16a7b93dc5893bc00fe83
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c6806e3f204413294bd16a7b93dc5893bc00fe83
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Sep 24 22:21:01 2020 -0500
ws2_32: Translate SIO_ADDRESS_LIST_CHANGE into a proper NT ioctl.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ws2_32/socket.c | 4 ++++
include/wine/afd.h | 2 ++
server/sock.c | 3 ++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index f43c57bf9a..1ac1f77d6e 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5164,6 +5164,10 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
case 0x667e: /* Netscape tries hard to use bogus ioctl 0x667e */
SetLastError(WSAEOPNOTSUPP);
return SOCKET_ERROR;
+ case WS_SIO_ADDRESS_LIST_CHANGE:
+ code = IOCTL_AFD_ADDRESS_LIST_CHANGE;
+ status = WSAEOPNOTSUPP;
+ break;
default:
status = WSAEOPNOTSUPP;
break;
diff --git a/include/wine/afd.h b/include/wine/afd.h
index 41caaa7b4f..24e6c31f22 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -25,6 +25,8 @@
#define IOCTL_AFD_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
+#define IOCTL_AFD_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
+
struct afd_create_params
{
int family, type, protocol;
diff --git a/server/sock.c b/server/sock.c
index 43a17d46ee..a0191d15e5 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -562,7 +562,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
- case WS_SIO_ADDRESS_LIST_CHANGE:
+ case IOCTL_AFD_ADDRESS_LIST_CHANGE:
if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async ))
{
set_win32_error( WSAEWOULDBLOCK );
@@ -572,6 +572,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
queue_async( &sock->ifchange_q, async );
set_error( STATUS_PENDING );
return 1;
+
default:
set_error( STATUS_NOT_SUPPORTED );
return 0;
More information about the wine-cvs
mailing list