netsniff-ng: Print process name of the netlink message origin
[netsniff-ng.git] / dissector_netlink.c
blob387f1989d8d810d11aeef7e8b95c52cd6c406b3a
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2014 Tobias Klauser.
4 * Subject to the GPL, version 2.
5 */
7 #include "dissector.h"
8 #include "dissector_netlink.h"
10 #ifdef HAVE_DISSECTOR_PROTOS
11 static inline void dissector_init_entry(int type)
13 dissector_set_print_type(&nlmsg_ops, type);
16 static inline void dissector_init_exit(int type)
18 dissector_set_print_type(&none_ops, type);
20 #else
21 static inline void dissector_init_entry(int type __maybe_unused) {}
22 static inline void dissector_init_exit(int type __maybe_unused) {}
23 #endif
25 void dissector_init_netlink(int fnttype)
27 dissector_init_entry(fnttype);
28 dissector_init_exit(fnttype);
31 void dissector_cleanup_netlink(void)