Signed-off-by: Zebediah Figura z.figura12@gmail.com --- 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;