Zebediah Figura : server: Introduce IOCTL_AFD_ACCEPT_INTO.
Alexandre Julliard
julliard at winehq.org
Fri Oct 2 14:54:09 CDT 2020
Module: wine
Branch: master
Commit: ea038894a6aa4b034e151e4f2af42da36710e180
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea038894a6aa4b034e151e4f2af42da36710e180
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Oct 1 23:14:00 2020 -0500
server: Introduce IOCTL_AFD_ACCEPT_INTO.
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 | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/include/wine/afd.h b/include/wine/afd.h
index 9ca03039f8..5a994084e1 100644
--- a/include/wine/afd.h
+++ b/include/wine/afd.h
@@ -25,6 +25,7 @@
#define IOCTL_AFD_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_WRITE_ACCESS)
+#define IOCTL_AFD_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
diff --git a/server/sock.c b/server/sock.c
index 26a2c4fa66..360bf756f9 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1108,6 +1108,27 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
+ case IOCTL_AFD_ACCEPT_INTO:
+ {
+ static const int access = FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | FILE_READ_DATA;
+ struct sock *acceptsock;
+ obj_handle_t handle;
+
+ if (get_req_data_size() != sizeof(handle))
+ {
+ set_error( STATUS_BUFFER_TOO_SMALL );
+ return 0;
+ }
+ handle = *(obj_handle_t *)get_req_data();
+
+ if (!(acceptsock = (struct sock *)get_handle_obj( current->process, handle, access, &sock_ops )))
+ return 0;
+ if (accept_into_socket( sock, acceptsock ))
+ acceptsock->wparam = handle;
+ release_object( acceptsock );
+ return 0;
+ }
+
case IOCTL_AFD_ADDRESS_LIST_CHANGE:
if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async ))
{
More information about the wine-cvs
mailing list