summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-05-12 21:17:36 -0300
committerGitHub <noreply@github.com>2020-05-12 21:17:36 -0300
commita10f92e685653bef0632416bbac140b45146d366 (patch)
tree41a22c8339f88434fcdfd6a9427518a8a90256f5 /zebra/zebra_router.c
parent02b89bdca2152ade522a10cc26bacae4aa660b84 (diff)
parent00ebe5b5f9616e77c9e9cdb535cb1a45124dd882 (diff)
Merge pull request #6250 from chiragshah6/yang_nb6
*: RIB operational northbound callbacks implementation
Diffstat (limited to 'zebra/zebra_router.c')
-rw-r--r--zebra/zebra_router.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index ab426ae603..61fef8779f 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -66,6 +66,22 @@ zebra_router_table_entry_compare(const struct zebra_router_table *e1,
return (e1->safi - e2->safi);
}
+struct zebra_router_table *zebra_router_find_zrt(struct zebra_vrf *zvrf,
+ uint32_t tableid, afi_t afi,
+ safi_t safi)
+{
+ struct zebra_router_table finder;
+ struct zebra_router_table *zrt;
+
+ memset(&finder, 0, sizeof(finder));
+ finder.afi = afi;
+ finder.safi = safi;
+ finder.tableid = tableid;
+ finder.ns_id = zvrf->zns->ns_id;
+ zrt = RB_FIND(zebra_router_table_head, &zrouter.tables, &finder);
+
+ return zrt;
+}
struct route_table *zebra_router_find_table(struct zebra_vrf *zvrf,
uint32_t tableid, afi_t afi,