diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2014-04-24 19:29:07 +0200 |
---|---|---|
committer | Christian Franke <chris@opensourcerouting.org> | 2017-01-30 13:51:50 +0100 |
commit | 0964ad9cecf3e60c843c3e55a26eecb522a98a29 (patch) | |
tree | 16bcb8e70088671ca1c5e4bbfb9a1eb40d965924 /lib/table.h | |
parent | lib: add route_node_lookup_maynull (diff) | |
download | frr-0964ad9cecf3e60c843c3e55a26eecb522a98a29.tar.xz frr-0964ad9cecf3e60c843c3e55a26eecb522a98a29.zip |
lib: add second-level route_table for srcdest
IPv6 srcdest routes need to be keyed by both destination and source
prefix. Since the lookup order is destination first, the simplest thing
to do here is to add a second route_table to destination entries, which
then contain source entries. Sadly, the result is somewhat confusing
since a route_node might now be either a source node or a destination
node.
There are helper functions to get source and destination prefix from a
given route node (which can be either a destination or a source route).
The following bits have been added by Christian Franke
<chris@opensourcerouting.org>:
- make srcdest routing table reusable by moving it into lib
- make the srcdest routing table structure more opaque
- implement a srcdest routing table iterator
- fix a refcounting issue in src_node_lookup
- match route_node_lookup behavior with srcdest_rnode_lookup
- add accessor for the route_node table and table_info
- add string formatter srcdest_rnode2str
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
[v3: adapted for cmaster-next as of 2016-12-05]
Diffstat (limited to 'lib/table.h')
-rw-r--r-- | lib/table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/table.h b/lib/table.h index e35e55dc1..6997b6bdd 100644 --- a/lib/table.h +++ b/lib/table.h @@ -25,6 +25,7 @@ #include "memory.h" DECLARE_MTYPE(ROUTE_TABLE) +DECLARE_MTYPE(ROUTE_NODE) /* * Forward declarations. |