summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-04-27 18:21:28 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-04-27 18:21:28 +0200
commit38fbb82405aa00315bb3a5e380ea34a28f5b9de7 (patch)
treeb48804d073aee4b829f67a8825dc3acb5fc1a3ff
parent613be40b15d8e645a188a003b2b125b2e3aced8b (diff)
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 <tklauser@distanz.ch>
-rw-r--r--proto_nlmsg.c6
1 files changed, 3 insertions, 3 deletions
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),