From d312a25879d5826ff1ca638410bbd36ba2619d93 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Fri, 24 Apr 2015 19:14:35 +0300 Subject: netsniff-ng nlmsg: Print netlink protocol name nlmsg proto handler can't identify Netlink protocol from nlmsghdr, so sockaddr_ll can be used to get it. Also renamed [proto -> handler] member in pkt_buff struct, which is more understandable. Example: >U nlmon0 4756 1429891435s.14505747ns [ NLMSG Proto 0 (RTNETLINK), Len 1160, Type 0x0010 (0x10), Flags 0x0002 (MULTI), Seq-Nr 1429891436, PID 31613 ] Signed-off-by: Vadim Kochan [tklauser: Handle usage of NETLINK_SOCK_DIAG with pre 3.10 kernel headers, fix nl_proto2str() return value, formatting changes] Signed-off-by: Tobias Klauser --- dissector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dissector.h') diff --git a/dissector.h b/dissector.h index fc20eda..d749205 100644 --- a/dissector.h +++ b/dissector.h @@ -100,7 +100,8 @@ static inline void show_frame_hdr(uint8_t *packet, size_t len, int linktype, } extern void dissector_init_all(int fnttype); -extern void dissector_entry_point(uint8_t *packet, size_t len, int linktype, int mode); +extern void dissector_entry_point(uint8_t *packet, size_t len, int linktype, + int mode, uint16_t proto); extern void dissector_cleanup_all(void); extern int dissector_set_print_type(void *ptr, int type); -- cgit v1.2.3-54-g00ecf