mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
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>
This commit is contained in:
parent
342795edb3
commit
f0533d9a5a
4 changed files with 18 additions and 12 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1431,29 +1431,31 @@ 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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
else /* <= 2003 the tests differ between TCP and UDP, UDP silently accepts */
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue