summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-11-15 10:01:59 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-11-16 09:43:42 +0100
commitabb4643b51674e053a448eb4f16769c21dde67ee (patch)
tree94ee7f1bb0449b70c6eb7a37fecdaaa5373ce1a6
parentc1be0d907fb57480421d7b684e0f1c4f10b65daa (diff)
netsniff-ng: nlmsg: Print not dissected attribute type number
Print not handled attributes which will be helpful to indicate such attributes and add dissection code. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--proto_nlmsg.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/proto_nlmsg.c b/proto_nlmsg.c
index 843e5cc..04f261d 100644
--- a/proto_nlmsg.c
+++ b/proto_nlmsg.c
@@ -319,6 +319,9 @@ static void rtnl_print_ifinfo(struct nlmsghdr *hdr)
attr_fmt(attr, "Network namespace fd %d",
RTA_INT(attr));
break;
+ default:
+ attr_fmt(attr, "0x%x", attr->rta_type);
+ break;
}
}
}
@@ -404,6 +407,9 @@ static void rtnl_print_ifaddr(struct nlmsghdr *hdr)
tprintf(", updated on(%.2fs))", (double)ci->cstamp / 100);
tprintf(", Len %d\n", RTA_LEN(attr));
break;
+ default:
+ attr_fmt(attr, "0x%x", attr->rta_type);
+ break;
}
}
}
@@ -461,7 +467,6 @@ static const char *route_type2str(uint8_t type)
case RTN_THROW: return "throw";
case RTN_NAT: return "nat";
case RTN_XRESOLVE: return "xresolve";
-
default: return "Unknown";
}
}
@@ -568,6 +573,9 @@ static void rtnl_print_route(struct nlmsghdr *hdr)
tprintf(", ts age(%ds))", ci->rta_tsage);
tprintf(", Len %d\n", RTA_LEN(attr));
break;
+ default:
+ attr_fmt(attr, "0x%x", attr->rta_type);
+ break;
}
}
}
@@ -673,6 +681,9 @@ static void rtnl_print_neigh(struct nlmsghdr *hdr)
tprintf(", refcnt(%d))", ci->ndm_refcnt);
tprintf(", Len %d\n", RTA_LEN(attr));
break;
+ default:
+ attr_fmt(attr, "0x%x", attr->rta_type);
+ break;
}
}
}