summaryrefslogtreecommitdiff
path: root/nest/rt.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-24 15:27:26 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-27 12:32:47 +0200
commit13ef5e53dd4a98c80261139b4c9ce4b1074cac40 (patch)
tree8508b9b004747a55b5d53fac22b29ce5f6977f57 /nest/rt.h
parent5c1ebe012e1bbfec52b4fba8b59edd355a7dff91 (diff)
The show-route CLI command now uses the route export API
In the multithreaded environment, it is not supposed that anybody traverses the routing table as the CLI show-route was doing. Now the routing table traversal is gone and CLI won't hold the table locked while computing filters.
Diffstat (limited to 'nest/rt.h')
-rw-r--r--nest/rt.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/nest/rt.h b/nest/rt.h
index 57e117da..c959d358 100644
--- a/nest/rt.h
+++ b/nest/rt.h
@@ -403,13 +403,12 @@ struct rt_show_data_rtable {
};
struct rt_show_data {
+ struct cli *cli; /* Pointer back to the CLI */
net_addr *addr;
list tables;
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 */
- struct f_trie *walk_lock; /* Locked trie for walking */
+ struct rt_export_request req; /* Export request in use */
int verbose, tables_defined_by;
const struct filter *filter;
struct proto *show_protocol;
@@ -420,10 +419,9 @@ struct rt_show_data {
struct rt_export_hook *kernel_export_hook;
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;
+ int show_counter_last_flush;
};
void rt_show(struct rt_show_data *);