[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt()
From: |
Laurent Vivier |
Subject: |
[PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt() |
Date: |
Thu, 21 Jan 2021 13:38:51 +0100 |
From: Shu-Chun Weng <scw@google.com>
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-5-scw@google.com>
[lv: Add missing <linux/in6.h> include for IPV6_ADDR_PREFERENCES]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/strace.c | 109 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 109 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 64172de99d98..e969121b6cd7 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -6,9 +6,11 @@
#include <sys/select.h>
#include <sys/mount.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <linux/if_packet.h>
+#include <linux/in6.h>
#include <linux/netlink.h>
#include <sched.h>
#include "qemu.h"
@@ -2761,6 +2763,113 @@ print_optint:
break;
}
break;
+ case SOL_IPV6:
+ qemu_log("SOL_IPV6,");
+ switch (optname) {
+ case IPV6_MTU_DISCOVER:
+ qemu_log("IPV6_MTU_DISCOVER,");
+ goto print_optint;
+ case IPV6_MTU:
+ qemu_log("IPV6_MTU,");
+ goto print_optint;
+ case IPV6_V6ONLY:
+ qemu_log("IPV6_V6ONLY,");
+ goto print_optint;
+ case IPV6_RECVPKTINFO:
+ qemu_log("IPV6_RECVPKTINFO,");
+ goto print_optint;
+ case IPV6_UNICAST_HOPS:
+ qemu_log("IPV6_UNICAST_HOPS,");
+ goto print_optint;
+ case IPV6_MULTICAST_HOPS:
+ qemu_log("IPV6_MULTICAST_HOPS,");
+ goto print_optint;
+ case IPV6_MULTICAST_LOOP:
+ qemu_log("IPV6_MULTICAST_LOOP,");
+ goto print_optint;
+ case IPV6_RECVERR:
+ qemu_log("IPV6_RECVERR,");
+ goto print_optint;
+ case IPV6_RECVHOPLIMIT:
+ qemu_log("IPV6_RECVHOPLIMIT,");
+ goto print_optint;
+ case IPV6_2292HOPLIMIT:
+ qemu_log("IPV6_2292HOPLIMIT,");
+ goto print_optint;
+ case IPV6_CHECKSUM:
+ qemu_log("IPV6_CHECKSUM,");
+ goto print_optint;
+ case IPV6_ADDRFORM:
+ qemu_log("IPV6_ADDRFORM,");
+ goto print_optint;
+ case IPV6_2292PKTINFO:
+ qemu_log("IPV6_2292PKTINFO,");
+ goto print_optint;
+ case IPV6_RECVTCLASS:
+ qemu_log("IPV6_RECVTCLASS,");
+ goto print_optint;
+ case IPV6_RECVRTHDR:
+ qemu_log("IPV6_RECVRTHDR,");
+ goto print_optint;
+ case IPV6_2292RTHDR:
+ qemu_log("IPV6_2292RTHDR,");
+ goto print_optint;
+ case IPV6_RECVHOPOPTS:
+ qemu_log("IPV6_RECVHOPOPTS,");
+ goto print_optint;
+ case IPV6_2292HOPOPTS:
+ qemu_log("IPV6_2292HOPOPTS,");
+ goto print_optint;
+ case IPV6_RECVDSTOPTS:
+ qemu_log("IPV6_RECVDSTOPTS,");
+ goto print_optint;
+ case IPV6_2292DSTOPTS:
+ qemu_log("IPV6_2292DSTOPTS,");
+ goto print_optint;
+ case IPV6_TCLASS:
+ qemu_log("IPV6_TCLASS,");
+ goto print_optint;
+ case IPV6_ADDR_PREFERENCES:
+ qemu_log("IPV6_ADDR_PREFERENCES,");
+ goto print_optint;
+#ifdef IPV6_RECVPATHMTU
+ case IPV6_RECVPATHMTU:
+ qemu_log("IPV6_RECVPATHMTU,");
+ goto print_optint;
+#endif
+#ifdef IPV6_TRANSPARENT
+ case IPV6_TRANSPARENT:
+ qemu_log("IPV6_TRANSPARENT,");
+ goto print_optint;
+#endif
+#ifdef IPV6_FREEBIND
+ case IPV6_FREEBIND:
+ qemu_log("IPV6_FREEBIND,");
+ goto print_optint;
+#endif
+#ifdef IPV6_RECVORIGDSTADDR
+ case IPV6_RECVORIGDSTADDR:
+ qemu_log("IPV6_RECVORIGDSTADDR,");
+ goto print_optint;
+#endif
+ case IPV6_PKTINFO:
+ qemu_log("IPV6_PKTINFO,");
+ print_pointer(optval, 0);
+ break;
+ case IPV6_ADD_MEMBERSHIP:
+ qemu_log("IPV6_ADD_MEMBERSHIP,");
+ print_pointer(optval, 0);
+ break;
+ case IPV6_DROP_MEMBERSHIP:
+ qemu_log("IPV6_DROP_MEMBERSHIP,");
+ print_pointer(optval, 0);
+ break;
+ default:
+ print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
+ print_pointer(optval, 0);
+ break;
+ }
+ break;
default:
print_raw_param(TARGET_ABI_FMT_ld, level, 0);
print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
--
2.29.2
- [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation, (continued)
[PULL 0/5] Linux user for 6.0 patches, Laurent Vivier, 2021/01/21
- [PULL 2/5] linux-user: add missing UDP get/setsockopt option, Laurent Vivier, 2021/01/21
- [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls, Laurent Vivier, 2021/01/21
- [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation, Laurent Vivier, 2021/01/21
- [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt(),
Laurent Vivier <=
- [PULL 3/5] linux-user: add missing IPv6 get/setsockopt option, Laurent Vivier, 2021/01/21
- Re: [PULL 0/5] Linux user for 6.0 patches, Peter Maydell, 2021/01/22