Added some de-initializing funcs to plugins, lq_plugins, netfilter, parser
[olsrd.git] / src / net_olsr.h
index c3cb781..058bc0c 100644 (file)
@@ -62,6 +62,14 @@ struct filter_entry {
 
 AVLNODE2STRUCT(filter_tree2filter, struct filter_entry, filter_node);
 
+#define OLSR_FOR_ALL_FILTERS(filter) \
+{ \
+  struct avl_node *filter_tree_node, *next_filter_tree_node; \
+  for (filter_tree_node = avl_walk_first(&filter_tree); \
+    filter_tree_node; filter_tree_node = next_filter_tree_node) { \
+    next_filter_tree_node = avl_walk_next(filter_tree_node); \
+    filter = filter_tree2filter(filter_tree_node);
+#define OLSR_FOR_ALL_FILTERS_END(filter) }}
 
 extern bool disp_pack_out;
 
@@ -69,6 +77,8 @@ static INLINE void net_set_disp_pack_out(bool val) { disp_pack_out = val; }
 
 void init_net(void);
 
+void deinit_netfilters(void);
+
 int net_add_buffer(struct interface *);
 
 void net_remove_buffer(struct interface *);