From abec60cfddd94fa5f856c071f5b5861e81899f8a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 16 Jun 2014 10:00:55 +0200 Subject: dissector: Get rid of now unnecessary HAVE_DISSECTOR_PROTOS Since commit 1cc762a ("lookup: Move UDP/TCP port and Ethernet type lookup into own module") the netsniff-ng tool is the only one using the dissector infrastructure. Thus we no longer need to conditionally device HAVE_DISSECTOR_PROTOS, since netsniff-ng is the only tool defining this. While at it, also remove the __WITH_PROTOS macro which is checked in dissector_init_ethernet/dissector_cleanup_ethernet but is defined nowhere. This will cause the functions to be called from both the ethernet and ieee80211 dissectors, thus make sure we check the initialization state before freeing as well. Signed-off-by: Tobias Klauser --- dissector_eth.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'dissector_eth.h') diff --git a/dissector_eth.h b/dissector_eth.h index 6d14809..79334d6 100644 --- a/dissector_eth.h +++ b/dissector_eth.h @@ -16,7 +16,6 @@ extern struct hash_table eth_lay3; extern void dissector_init_ethernet(int fnttype); extern void dissector_cleanup_ethernet(void); -#ifdef HAVE_DISSECTOR_PROTOS static inline struct protocol *dissector_get_ethernet_entry_point(void) { return ðernet_ops; @@ -26,15 +25,5 @@ static inline struct protocol *dissector_get_ethernet_exit_point(void) { return &none_ops; } -#else -static inline struct protocol *dissector_get_ethernet_entry_point(void) -{ - return NULL; -} -static inline struct protocol *dissector_get_ethernet_exit_point(void) -{ - return NULL; -} -#endif #endif /* DISSECTOR_ETH_H */ -- cgit v1.2.3-54-g00ecf