summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-12-02 03:30:39 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2022-02-06 23:27:13 +0100
commit9ac16df3d7239bc82d8016591755b41b14285608 (patch)
treea7bc68eb921c5e9e2489bbca2430347c6e88599d /nest/route.h
parentea97b8905197180bee5244bce378d03e4b741d88 (diff)
Nest: Add trie iteration code to 'show route'
Add trie iteration code to rt_show_cont() CLI hook and use it to accelerate 'show route in <addr>' commands using interval queries.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h
index ace4c7f7..5f0c3578 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -23,6 +23,7 @@ struct timer;
struct fib;
struct filter;
struct f_trie;
+struct f_trie_walk_state;
struct cli;
/*
@@ -377,6 +378,7 @@ struct rt_show_data {
struct rt_show_data_rtable *tab; /* Iterator over table list */
struct rt_show_data_rtable *last_table; /* Last table in output */
struct fib_iterator fit; /* Iterator over networks in table */
+ struct f_trie_walk_state *walk_state; /* Iterator over networks in trie */
int verbose, tables_defined_by;
const struct filter *filter;
struct proto *show_protocol;
@@ -387,6 +389,7 @@ struct rt_show_data {
int export_mode, addr_mode, primary_only, filtered, stats;
int table_open; /* Iteration (fit) is open */
+ int trie_walk; /* Current table is iterated using trie */
int net_counter, rt_counter, show_counter, table_counter;
int net_counter_last, rt_counter_last, show_counter_last;
};