mausezahn: Don't use ternary operator to decide which function to call
[netsniff-ng.git] / dissector_netlink.h
blob185881c10477f09474c2adab3c5ab4578322bf78
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2014 Tobias Klauser.
4 * Subject to the GPL, version 2.
5 */
7 #ifndef DISSECTOR_NETLINK_H
8 #define DISSECTOR_NETLINK_H
10 #include "protos.h"
12 extern void dissector_init_netlink(int fnttype);
13 extern void dissector_cleanup_netlink(void);
15 #ifdef HAVE_DISSECTOR_PROTOS
16 static inline struct protocol *dissector_get_netlink_entry_point(void)
18 return &nlmsg_ops;
21 static inline struct protocol *dissector_get_netlink_exit_point(void)
23 return &none_ops;
25 #else
26 static inline struct protocol *dissector_get_netlink_entry_point(void)
28 return NULL;
31 static inline struct protocol *dissector_get_netlink_exit_point(void)
33 return NULL;
35 #endif /* HAVE_DISSECTOR_PROTOS */
37 #endif /* DISSECTOR_NETLINK_H */