diff options
author | Maria Matejka <mq@ucw.cz> | 2022-06-24 15:27:26 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-06-27 12:32:47 +0200 |
commit | 13ef5e53dd4a98c80261139b4c9ce4b1074cac40 (patch) | |
tree | 8508b9b004747a55b5d53fac22b29ce5f6977f57 /nest/rt.h | |
parent | 5c1ebe012e1bbfec52b4fba8b59edd355a7dff91 (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.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 *); |