Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
98d1dc31
Commit
98d1dc31
authored
May 13, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Rename Wine-specific socket ioctls.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21efebbd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
socket.c
dlls/ws2_32/socket.c
+4
-4
afd.h
include/wine/afd.h
+4
-4
sock.c
server/sock.c
+5
-5
No files found.
dlls/ws2_32/socket.c
View file @
98d1dc31
...
...
@@ -2341,7 +2341,7 @@ SOCKET WINAPI WS_accept( SOCKET s, struct WS_sockaddr *addr, int *len )
if
(
!
(
sync_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
)))
return
INVALID_SOCKET
;
status
=
NtDeviceIoControlFile
(
SOCKET2HANDLE
(
s
),
(
HANDLE
)((
ULONG_PTR
)
sync_event
|
0
),
NULL
,
NULL
,
&
io
,
IOCTL_AFD_ACCEPT
,
NULL
,
0
,
&
accept_handle
,
sizeof
(
accept_handle
)
);
IOCTL_AFD_
WINE_
ACCEPT
,
NULL
,
0
,
&
accept_handle
,
sizeof
(
accept_handle
)
);
if
(
status
==
STATUS_PENDING
)
{
if
(
WaitForSingleObject
(
sync_event
,
INFINITE
)
==
WAIT_FAILED
)
...
...
@@ -2416,7 +2416,7 @@ static BOOL WINAPI WS2_AcceptEx( SOCKET listener, SOCKET acceptor, void *dest, D
}
status
=
NtDeviceIoControlFile
(
SOCKET2HANDLE
(
listener
),
overlapped
->
hEvent
,
NULL
,
cvalue
,
(
IO_STATUS_BLOCK
*
)
overlapped
,
IOCTL_AFD_ACCEPT_INTO
,
&
params
,
sizeof
(
params
),
(
IO_STATUS_BLOCK
*
)
overlapped
,
IOCTL_AFD_
WINE_
ACCEPT_INTO
,
&
params
,
sizeof
(
params
),
dest
,
recv_len
+
local_len
+
remote_len
);
if
(
ret_len
)
*
ret_len
=
overlapped
->
InternalHigh
;
...
...
@@ -4507,7 +4507,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
SetLastError
(
WSAEOPNOTSUPP
);
return
SOCKET_ERROR
;
case
WS_SIO_ADDRESS_LIST_CHANGE
:
code
=
IOCTL_AFD_ADDRESS_LIST_CHANGE
;
code
=
IOCTL_AFD_
WINE_
ADDRESS_LIST_CHANGE
;
status
=
WSAEOPNOTSUPP
;
break
;
default:
...
...
@@ -5921,7 +5921,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
create_params
.
protocol
=
protocol
;
create_params
.
flags
=
flags
&
~
(
WSA_FLAG_NO_HANDLE_INHERIT
|
WSA_FLAG_OVERLAPPED
);
if
((
status
=
NtDeviceIoControlFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
io
,
IOCTL_AFD_CREATE
,
&
create_params
,
sizeof
(
create_params
),
NULL
,
0
)))
IOCTL_AFD_
WINE_
CREATE
,
&
create_params
,
sizeof
(
create_params
),
NULL
,
0
)))
{
WARN
(
"Failed to initialize socket, status %#x.
\n
"
,
status
);
err
=
RtlNtStatusToDosError
(
status
);
...
...
include/wine/afd.h
View file @
98d1dc31
...
...
@@ -24,11 +24,11 @@
#include <winioctl.h>
#include "wine/server_protocol.h"
#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_
WINE_CREATE
CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_
WINE_ACCEPT
CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_
WINE_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)
#define IOCTL_AFD_
WINE_ADDRESS_LIST_CHANGE
CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
struct
afd_create_params
{
...
...
server/sock.c
View file @
98d1dc31
...
...
@@ -1357,11 +1357,11 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
assert
(
sock
->
obj
.
ops
==
&
sock_ops
);
if
(
code
!=
IOCTL_AFD_CREATE
&&
get_unix_fd
(
fd
)
<
0
)
return
0
;
if
(
code
!=
IOCTL_AFD_
WINE_
CREATE
&&
get_unix_fd
(
fd
)
<
0
)
return
0
;
switch
(
code
)
{
case
IOCTL_AFD_CREATE
:
case
IOCTL_AFD_
WINE_
CREATE
:
{
const
struct
afd_create_params
*
params
=
get_req_data
();
...
...
@@ -1374,7 +1374,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return
0
;
}
case
IOCTL_AFD_ACCEPT
:
case
IOCTL_AFD_
WINE_
ACCEPT
:
{
struct
sock
*
acceptsock
;
obj_handle_t
handle
;
...
...
@@ -1409,7 +1409,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return
0
;
}
case
IOCTL_AFD_ACCEPT_INTO
:
case
IOCTL_AFD_
WINE_
ACCEPT_INTO
:
{
static
const
int
access
=
FILE_READ_ATTRIBUTES
|
FILE_WRITE_ATTRIBUTES
|
FILE_READ_DATA
;
const
struct
afd_accept_into_params
*
params
=
get_req_data
();
...
...
@@ -1459,7 +1459,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return
1
;
}
case
IOCTL_AFD_ADDRESS_LIST_CHANGE
:
case
IOCTL_AFD_
WINE_
ADDRESS_LIST_CHANGE
:
if
((
sock
->
state
&
FD_WINE_NONBLOCKING
)
&&
async_is_blocking
(
async
))
{
set_error
(
STATUS_DEVICE_NOT_READY
);
...
...
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