return decode_nla_xval(tcp, addr, len, &opts);
}
+bool
+decode_nla_in_addr(struct tcb *const tcp,
+ const kernel_ulong_t addr,
+ const unsigned int len,
+ const void *const opaque_data)
+{
+ struct in_addr in;
+
+ if (len < sizeof(in))
+ return false;
+ else if (!umove_or_printaddr(tcp, addr, &in))
+ print_inet_addr(AF_INET, &in, sizeof(in), NULL);
+
+ return true;
+}
+
+bool
+decode_nla_in6_addr(struct tcb *const tcp,
+ const kernel_ulong_t addr,
+ const unsigned int len,
+ const void *const opaque_data)
+{
+ struct in6_addr in6;
+
+ if (len < sizeof(in6))
+ return false;
+ else if (!umove_or_printaddr(tcp, addr, &in6))
+ print_inet_addr(AF_INET6, &in6, sizeof(in6), NULL);
+
+ return true;
+}
+
bool
decode_nla_flags(struct tcb *const tcp,
const kernel_ulong_t addr,
return true;
}
-static bool
-decode_ifla_inet6_token(struct tcb *const tcp,
- const kernel_ulong_t addr,
- const unsigned int len,
- const void *const opaque_data)
-{
- struct in6_addr in6;
-
- if (len < sizeof(in6))
- return false;
- else if (!umove_or_printaddr(tcp, addr, &in6))
- print_inet_addr(AF_INET6, &in6, sizeof(in6), NULL);
-
- return true;
-}
-
static bool
decode_ifla_inet6_agm(struct tcb *const tcp,
const kernel_ulong_t addr,
[IFLA_INET6_MCAST] = NULL, /* unused */
[IFLA_INET6_CACHEINFO] = decode_ifla_inet6_cacheinfo,
[IFLA_INET6_ICMP6STATS] = decode_ifla_inet6_icmp6_stats,
- [IFLA_INET6_TOKEN] = decode_ifla_inet6_token,
+ [IFLA_INET6_TOKEN] = decode_nla_in6_addr,
[IFLA_INET6_ADDR_GEN_MODE] = decode_ifla_inet6_agm,
};