From 38fbb82405aa00315bb3a5e380ea34a28f5b9de7 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 27 Apr 2015 18:21:28 +0200 Subject: netsniff-ng: nlmsg: Rename function and dissector field Netlink messages don't use the term `family' instead of `protocol', so stick to it when printing dissected information. Also, functions with the `nl_' prefix are used by libnl, so in order to not confuse it with libnl functions, rename nl_proto2str() to nlmsg_family2str() Signed-off-by: Tobias Klauser --- proto_nlmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'proto_nlmsg.c') diff --git a/proto_nlmsg.c b/proto_nlmsg.c index b219867..eb38cdd 100644 --- a/proto_nlmsg.c +++ b/proto_nlmsg.c @@ -14,7 +14,7 @@ #include "proto.h" #include "protos.h" -static const char *nl_proto2str(uint16_t proto) +static const char *nlmsg_family2str(uint16_t proto) { switch (proto) { case NETLINK_ROUTE: return "RTNETLINK"; @@ -77,8 +77,8 @@ static void nlmsg(struct pkt_buff *pkt) snprintf(procname, sizeof(procname), "kernel"); tprintf(" [ NLMSG "); - tprintf("Proto %d (%s%s%s), ", ntohs(pkt->proto), colorize_start(bold), - nl_proto2str(ntohs(pkt->proto)), colorize_end()); + tprintf("Family %d (%s%s%s), ", ntohs(pkt->proto), colorize_start(bold), + nlmsg_family2str(ntohs(pkt->proto)), colorize_end()); tprintf("Len %u, ", hdr->nlmsg_len); tprintf("Type 0x%.4x (%s%s%s), ", hdr->nlmsg_type, colorize_start(bold), -- cgit v1.2.3-54-g00ecf