Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9bbf3ab9
Commit
9bbf3ab9
authored
Jun 14, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Implement IOCTL_AFD_EVENT_SELECT.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e6258c54
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
socket.c
dlls/ntdll/unix/socket.c
+11
-0
afd.h
include/wine/afd.h
+19
-0
sock.c
server/sock.c
+53
-0
No files found.
dlls/ntdll/unix/socket.c
View file @
9bbf3ab9
...
...
@@ -1170,6 +1170,17 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
break
;
}
case
IOCTL_AFD_EVENT_SELECT
:
{
const
struct
afd_event_select_params
*
params
=
in_buffer
;
TRACE
(
"event %p, mask %#x
\n
"
,
params
->
event
,
params
->
mask
);
if
(
out_size
)
FIXME
(
"unexpected output size %u
\n
"
,
out_size
);
status
=
STATUS_BAD_DEVICE_TYPE
;
break
;
}
case
IOCTL_AFD_RECV
:
{
const
struct
afd_recv_params
*
params
=
in_buffer
;
...
...
include/wine/afd.h
View file @
9bbf3ab9
...
...
@@ -35,6 +35,7 @@
#define IOCTL_AFD_LISTEN CTL_CODE(FILE_DEVICE_BEEP, 0x802, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_AFD_RECV CTL_CODE(FILE_DEVICE_BEEP, 0x805, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_AFD_POLL CTL_CODE(FILE_DEVICE_BEEP, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_EVENT_SELECT CTL_CODE(FILE_DEVICE_BEEP, 0x821, METHOD_NEITHER, FILE_ANY_ACCESS)
enum
afd_poll_bit
{
...
...
@@ -106,6 +107,24 @@ struct afd_poll_params
};
#include <poppack.h>
struct
afd_event_select_params
{
HANDLE
event
;
int
mask
;
};
struct
afd_event_select_params_64
{
ULONGLONG
event
;
int
mask
;
};
struct
afd_event_select_params_32
{
ULONG
event
;
int
mask
;
};
#define IOCTL_AFD_WINE_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_ANY_ACCESS)
...
...
server/sock.c
View file @
9bbf3ab9
...
...
@@ -2011,6 +2011,59 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
}
return
1
;
case
IOCTL_AFD_EVENT_SELECT
:
{
struct
event
*
event
=
NULL
;
obj_handle_t
event_handle
;
int
mask
;
if
(
is_machine_64bit
(
current
->
process
->
machine
))
{
const
struct
afd_event_select_params_64
*
params
=
get_req_data
();
if
(
get_req_data_size
()
<
sizeof
(
params
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
1
;
}
event_handle
=
params
->
event
;
mask
=
params
->
mask
;
}
else
{
const
struct
afd_event_select_params_32
*
params
=
get_req_data
();
if
(
get_req_data_size
()
<
sizeof
(
params
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
1
;
}
event_handle
=
params
->
event
;
mask
=
params
->
mask
;
}
if
((
event_handle
||
mask
)
&&
!
(
event
=
get_event_obj
(
current
->
process
,
event_handle
,
EVENT_MODIFY_STATE
)))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
1
;
}
if
(
sock
->
event
)
release_object
(
sock
->
event
);
sock
->
event
=
event
;
sock
->
mask
=
mask
;
sock
->
window
=
0
;
sock
->
message
=
0
;
sock
->
wparam
=
0
;
sock
->
nonblocking
=
1
;
sock_reselect
(
sock
);
return
1
;
}
default:
set_error
(
STATUS_NOT_SUPPORTED
);
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment