tprints("}");
}
-static void
-decode_inet_addr(struct tcb *const tcp,
- const kernel_ulong_t addr,
- const unsigned int len,
- const int family)
-{
- union {
- struct in_addr a4;
- struct in6_addr a6;
- } addrbuf;
- size_t size = 0;
-
- switch (family) {
- case AF_INET:
- size = sizeof(addrbuf.a4);
- break;
- case AF_INET6:
- size = sizeof(addrbuf.a6);
- break;
- }
-
- if (!size || len < size) {
- tprints("addr=");
- printstr_ex(tcp, addr, len, QUOTE_FORCE_HEX);
- return;
- }
-
- if (umoven(tcp, addr, size, &addrbuf) < 0) {
- tprints("addr=");
- printaddr(addr);
- return;
- }
-
- print_inet_addr(family, &addrbuf, size, "addr");
-}
-
static void
decode_inet_diag_hostcond(struct tcb *const tcp,
const kernel_ulong_t addr,
if (len > sizeof(cond)) {
tprints(", ");
decode_inet_addr(tcp, addr + sizeof(cond),
- len - sizeof(cond), cond.family);
+ len - sizeof(cond), cond.family, "addr");
}
tprints("}");
}
tprints("...");
tprints("}");
- offset = NLA_ALIGN(sizeof(req));
+ offset = NLMSG_ALIGN(sizeof(req));
if (decode_nla && len > offset) {
tprints(", ");
decode_nlattr(tcp, addr + offset, len - offset,
tprints("...");
tprints("}");
- offset = NLA_ALIGN(sizeof(req));
+ offset = NLMSG_ALIGN(sizeof(req));
if (decode_nla && len > offset) {
tprints(", ");
decode_nlattr(tcp, addr + offset, len - offset,
[INET_DIAG_PEERS] = NULL, /* unimplemented */
[INET_DIAG_PAD] = NULL,
[INET_DIAG_MARK] = decode_nla_u32,
- [INET_DIAG_BBRINFO] = decode_tcp_bbr_info
+ [INET_DIAG_BBRINFO] = decode_tcp_bbr_info,
+ [INET_DIAG_CLASS_ID] = decode_nla_u32
};
DECL_NETLINK_DIAG_DECODER(decode_inet_diag_msg)
tprints("...");
tprints("}");
- offset = NLA_ALIGN(sizeof(msg));
+ offset = NLMSG_ALIGN(sizeof(msg));
if (decode_nla && len > offset) {
tprints(", ");
decode_nlattr(tcp, addr + offset, len - offset,