Zebediah Figura : server: Introduce IOCTL_AFD_WINE_GET_SO_ACCEPTCONN.
Alexandre Julliard
julliard at winehq.org
Wed Jun 23 16:10:10 CDT 2021
Module: wine
Branch: master
Commit: 697f9e979e95fe9345291dbcd46df757fc6f6bdb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=697f9e979e95fe9345291dbcd46df757fc6f6bdb
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Jun 23 11:23:42 2021 -0500
server: Introduce IOCTL_AFD_WINE_GET_SO_ACCEPTCONN.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/afd.h | 1 +
server/sock.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/include/wine/afd.h b/include/wine/afd.h
index e497eece0be..4c501872dde 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -159,6 +159,7 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_GETPEERNAME CTL_CODE(FILE_DEVICE_NETWORK, 216, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GET_INFO CTL_CODE(FILE_DEVICE_NETWORK, 218, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_AFD_WINE_GET_SO_ACCEPTCONN CTL_CODE(FILE_DEVICE_NETWORK, 219, METHOD_BUFFERED, FILE_ANY_ACCESS)
struct afd_create_params
{
diff --git a/server/sock.c b/server/sock.c
index b73fbb98388..71f22845827 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -2532,6 +2532,20 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
+ case IOCTL_AFD_WINE_GET_SO_ACCEPTCONN:
+ {
+ int listening = (sock->state == SOCK_LISTENING);
+
+ if (get_reply_max_size() < sizeof(listening))
+ {
+ set_error( STATUS_BUFFER_TOO_SMALL );
+ return 0;
+ }
+
+ set_reply_data( &listening, sizeof(listening) );
+ return 1;
+ }
+
default:
set_error( STATUS_NOT_SUPPORTED );
return 0;
More information about the wine-cvs
mailing list