summaryrefslogtreecommitdiff
path: root/proto_nlmsg.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-05-05 13:29:24 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-05-05 14:40:26 +0200
commitd8f6f8236b29ff573415d3730a66a4a39e2fb443 (patch)
tree6d547496776dcb436794bea4c3d5e268aa1a610d /proto_nlmsg.c
parent67e0574edb3c6919382ff96da1bcd800f9bfe45e (diff)
netsniff-ng nlmsg: Print family & type in less mode
Print 'Family' and 'Type' (considering family) fields in less mode. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_nlmsg.c')
-rw-r--r--proto_nlmsg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/proto_nlmsg.c b/proto_nlmsg.c
index e8706a2..136cec6 100644
--- a/proto_nlmsg.c
+++ b/proto_nlmsg.c
@@ -190,9 +190,11 @@ static void nlmsg_less(struct pkt_buff *pkt)
if (hdr == NULL)
return;
- tprintf(" NLMSG %u (%s%s%s)", hdr->nlmsg_type, colorize_start(bold),
- nl_nlmsgtype2str(hdr->nlmsg_type, type, sizeof(type)),
- colorize_end());
+ tprintf(" NLMSG Family %d (%s%s%s), ", ntohs(pkt->proto), colorize_start(bold),
+ nlmsg_family2str(ntohs(pkt->proto)), colorize_end());
+ tprintf("Type %u (%s%s%s)", hdr->nlmsg_type, colorize_start(bold),
+ nlmsg_type2str(ntohs(pkt->proto), hdr->nlmsg_type, type,
+ sizeof(type)), colorize_end());
}
struct protocol nlmsg_ops = {