From d8f6f8236b29ff573415d3730a66a4a39e2fb443 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 5 May 2015 13:29:24 +0300 Subject: netsniff-ng nlmsg: Print family & type in less mode Print 'Family' and 'Type' (considering family) fields in less mode. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- proto_nlmsg.c | 8 +++++--- 1 file 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 = { -- cgit v1.2.3-54-g00ecf