ws2_32: Handle more IGMP socket options.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47956 Signed-off-by: Fabian Maurer <dark.shadow4@web.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f09f5f80f7
commit
bf24c316f4
|
@ -692,6 +692,10 @@ static const int ws_ip_map[][2] =
|
||||||
MAP_OPTION( IP_MULTICAST_LOOP ),
|
MAP_OPTION( IP_MULTICAST_LOOP ),
|
||||||
MAP_OPTION( IP_ADD_MEMBERSHIP ),
|
MAP_OPTION( IP_ADD_MEMBERSHIP ),
|
||||||
MAP_OPTION( IP_DROP_MEMBERSHIP ),
|
MAP_OPTION( IP_DROP_MEMBERSHIP ),
|
||||||
|
MAP_OPTION( IP_ADD_SOURCE_MEMBERSHIP ),
|
||||||
|
MAP_OPTION( IP_DROP_SOURCE_MEMBERSHIP ),
|
||||||
|
MAP_OPTION( IP_BLOCK_SOURCE ),
|
||||||
|
MAP_OPTION( IP_UNBLOCK_SOURCE ),
|
||||||
MAP_OPTION( IP_OPTIONS ),
|
MAP_OPTION( IP_OPTIONS ),
|
||||||
#ifdef IP_HDRINCL
|
#ifdef IP_HDRINCL
|
||||||
MAP_OPTION( IP_HDRINCL ),
|
MAP_OPTION( IP_HDRINCL ),
|
||||||
|
@ -5801,6 +5805,7 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
|
||||||
int woptval;
|
int woptval;
|
||||||
struct linger linger;
|
struct linger linger;
|
||||||
struct timeval tval;
|
struct timeval tval;
|
||||||
|
struct ip_mreq_source mreq_source;
|
||||||
|
|
||||||
TRACE("(socket %04lx, %s, optval %s, optlen %d)\n", s,
|
TRACE("(socket %04lx, %s, optval %s, optlen %d)\n", s,
|
||||||
debugstr_sockopt(level, optname), debugstr_optval(optval, optlen),
|
debugstr_sockopt(level, optname), debugstr_optval(optval, optlen),
|
||||||
|
@ -6011,6 +6016,22 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
|
||||||
case WS_IPPROTO_IP:
|
case WS_IPPROTO_IP:
|
||||||
switch(optname)
|
switch(optname)
|
||||||
{
|
{
|
||||||
|
case WS_IP_ADD_SOURCE_MEMBERSHIP:
|
||||||
|
case WS_IP_DROP_SOURCE_MEMBERSHIP:
|
||||||
|
case WS_IP_BLOCK_SOURCE:
|
||||||
|
case WS_IP_UNBLOCK_SOURCE:
|
||||||
|
{
|
||||||
|
WS_IP_MREQ_SOURCE* val = (void*)optval;
|
||||||
|
mreq_source.imr_interface.s_addr = val->imr_interface.S_un.S_addr;
|
||||||
|
mreq_source.imr_multiaddr.s_addr = val->imr_multiaddr.S_un.S_addr;
|
||||||
|
mreq_source.imr_sourceaddr.s_addr = val->imr_sourceaddr.S_un.S_addr;
|
||||||
|
|
||||||
|
optval = (char*)&mreq_source;
|
||||||
|
optlen = sizeof(mreq_source);
|
||||||
|
|
||||||
|
convert_sockopt(&level, &optname);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WS_IP_ADD_MEMBERSHIP:
|
case WS_IP_ADD_MEMBERSHIP:
|
||||||
case WS_IP_DROP_MEMBERSHIP:
|
case WS_IP_DROP_MEMBERSHIP:
|
||||||
#ifdef IP_HDRINCL
|
#ifdef IP_HDRINCL
|
||||||
|
|
Loading…
Reference in New Issue