If available and set, print 'v6only:1' for AF_INET6 sockets upon request
of extended information. For IPv6 sockets bound to in6addr_any, this is
the only way to determine if they will also accept IPv4 requests or not.
Signed-off-by: Phil Sutter <phil@nwl.cc>
if (show_details) {
sock_details_print(&s);
+ if (s.local.family == AF_INET6 && tb[INET_DIAG_SKV6ONLY]) {
+ unsigned char v6only;
+ v6only = *(__u8 *)RTA_DATA(tb[INET_DIAG_SKV6ONLY]);
+ printf(" v6only:%u", v6only);
+ }
if (tb[INET_DIAG_SHUTDOWN]) {
unsigned char mask;
mask = *(__u8 *)RTA_DATA(tb[INET_DIAG_SHUTDOWN]);