From: Vadim Kochan <[email protected]>

Print 'Family' and 'Type' (considering family) fields in less mode.

Signed-off-by: Vadim Kochan <[email protected]>
---
 proto_nlmsg.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/proto_nlmsg.c b/proto_nlmsg.c
index e8706a2..c651659 100644
--- a/proto_nlmsg.c
+++ b/proto_nlmsg.c
@@ -190,9 +190,12 @@ 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 ");
+       tprintf("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 = {
-- 
2.3.1

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to