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
f0533d9a
Commit
f0533d9a
authored
Jul 07, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Move the setsockopt(IP_HDRINCL) implementation to ntdll.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
342795ed
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
socket.c
dlls/ntdll/unix/socket.c
+3
-0
socket.c
dlls/ws2_32/socket.c
+3
-3
sock.c
dlls/ws2_32/tests/sock.c
+5
-3
afd.h
include/wine/afd.h
+1
-0
No files found.
dlls/ntdll/unix/socket.c
View file @
f0533d9a
...
...
@@ -1745,6 +1745,9 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
#ifdef IP_HDRINCL
case
IOCTL_AFD_WINE_GET_IP_HDRINCL
:
return
do_getsockopt
(
handle
,
io
,
IPPROTO_IP
,
IP_HDRINCL
,
out_buffer
,
out_size
);
case
IOCTL_AFD_WINE_SET_IP_HDRINCL
:
return
do_setsockopt
(
handle
,
io
,
IPPROTO_IP
,
IP_HDRINCL
,
in_buffer
,
in_size
);
#endif
default:
...
...
dlls/ws2_32/socket.c
View file @
f0533d9a
...
...
@@ -3643,6 +3643,9 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
case
WS_IP_DROP_SOURCE_MEMBERSHIP
:
return
server_setsockopt
(
s
,
IOCTL_AFD_WINE_SET_IP_DROP_SOURCE_MEMBERSHIP
,
optval
,
optlen
);
case
WS_IP_HDRINCL
:
return
server_setsockopt
(
s
,
IOCTL_AFD_WINE_SET_IP_HDRINCL
,
optval
,
optlen
);
case
WS_IP_UNBLOCK_SOURCE
:
{
WS_IP_MREQ_SOURCE
*
val
=
(
void
*
)
optval
;
...
...
@@ -3656,9 +3659,6 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
convert_sockopt
(
&
level
,
&
optname
);
break
;
}
#ifdef IP_HDRINCL
case
WS_IP_HDRINCL
:
#endif
case
WS_IP_MULTICAST_IF
:
case
WS_IP_MULTICAST_LOOP
:
case
WS_IP_MULTICAST_TTL
:
...
...
dlls/ws2_32/tests/sock.c
View file @
f0533d9a
...
...
@@ -1431,26 +1431,28 @@ todo_wine
err
=
setsockopt
(
s
,
IPPROTO_IP
,
IP_HDRINCL
,
(
char
*
)
&
k
,
size
);
if
(
err
==
-
1
)
/* >= Vista */
{
todo_wine
{
ok
(
GetLastError
()
==
WSAEINVAL
,
"Expected 10022, got %d
\n
"
,
GetLastError
());
k
=
99
;
SetLastError
(
0xdeadbeef
);
err
=
getsockopt
(
s
,
IPPROTO_IP
,
IP_HDRINCL
,
(
char
*
)
&
k
,
&
size
);
todo_wine
{
ok
(
err
==
-
1
,
"Expected -1, got %d
\n
"
,
err
);
ok
(
GetLastError
()
==
WSAEINVAL
,
"Expected 10022, got %d
\n
"
,
GetLastError
());
ok
(
k
==
99
,
"Expected 99, got %d
\n
"
,
k
);
}
size
=
sizeof
(
k
);
k
=
0
;
SetLastError
(
0xdeadbeef
);
err
=
setsockopt
(
s
,
IPPROTO_IP
,
IP_HDRINCL
,
(
char
*
)
&
k
,
size
);
}
ok
(
err
==
-
1
,
"Expected -1, got %d
\n
"
,
err
);
todo_wine
{
ok
(
GetLastError
()
==
WSAEINVAL
,
"Expected 10022, got %d
\n
"
,
GetLastError
());
k
=
99
;
SetLastError
(
0xdeadbeef
);
err
=
getsockopt
(
s
,
IPPROTO_IP
,
IP_HDRINCL
,
(
char
*
)
&
k
,
&
size
);
todo_wine
{
ok
(
err
==
-
1
,
"Expected -1, got %d
\n
"
,
err
);
ok
(
GetLastError
()
==
WSAEINVAL
,
"Expected 10022, got %d
\n
"
,
GetLastError
());
ok
(
k
==
99
,
"Expected 99, got %d
\n
"
,
k
);
...
...
include/wine/afd.h
View file @
f0533d9a
...
...
@@ -189,6 +189,7 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_SET_IP_DROP_MEMBERSHIP WINE_AFD_IOC(244)
#define IOCTL_AFD_WINE_SET_IP_DROP_SOURCE_MEMBERSHIP WINE_AFD_IOC(245)
#define IOCTL_AFD_WINE_GET_IP_HDRINCL WINE_AFD_IOC(246)
#define IOCTL_AFD_WINE_SET_IP_HDRINCL WINE_AFD_IOC(247)
struct
afd_create_params
{
...
...
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