linux-user: Add sockopts for IPv6 ping and IPv6 traceroute

Add the neccessary sockopts for ping and traceroute on IPv6.

This fixes the following qemu warnings with IPv6:
Unsupported ancillary data: 0/2
Unsupported ancillary data: 0/11
Unsupported ancillary data: 41/25
Unsupported setsockopt level=0 optname=12
Unsupported setsockopt level=41 optname=16
Unsupported setsockopt level=41 optname=25
Unsupported setsockopt level=41 optname=50
Unsupported setsockopt level=41 optname=51
Unsupported setsockopt level=41 optname=8
Unsupported setsockopt level=58 optname=1

Tested with hppa-linux-user (big-endian) on x86_64 (little-endian).

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170218223130.GA25278@ls3530.fritz.box>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Helge Deller 2017-02-18 23:31:30 +01:00 committed by Laurent Vivier
parent 7eddb5ddac
commit ee1ac3a182
2 changed files with 139 additions and 1 deletions

View file

@ -164,6 +164,14 @@ struct target_sockaddr_in {
sizeof(struct target_in_addr)];
};
struct target_sockaddr_in6 {
uint16_t sin6_family;
uint16_t sin6_port; /* big endian */
uint32_t sin6_flowinfo; /* big endian */
struct in6_addr sin6_addr; /* IPv6 address, big endian */
uint32_t sin6_scope_id;
};
struct target_sock_filter {
abi_ushort code;
uint8_t jt;