From 1b5ed1b054b955275bb7cf0f80fb7767094bc28b Mon Sep 17 00:00:00 2001 From: Avneesh Sachdev Date: Tue, 13 Nov 2012 22:48:54 +0000 Subject: zebra: add way to determine VRF/AFI/SAFI of table Add some code that allows us to determine which VRF and AFI/SAFI a given RIB table corresponds to. * zebra/rib.h Add rib_table_info_t structure, which contains information about the VRF, AFI and SAFI that a table is for. * zebra/zebra_rib.c - Add the vrf_table_create() function, which creates a table and sets its 'info' pointer to a newly created rib_table_info_t. The 'info' pointer allows us to go from a route_node or a table to the associated vrf. - vrf_alloc(): Use vrf_create_table() to create tables. * lib/memtypes.c Add memory type for rib_table_info_t. Signed-off-by: Avneesh Sachdev Signed-off-by: David Lamparter --- lib/memtypes.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/memtypes.c') diff --git a/lib/memtypes.c b/lib/memtypes.c index 76dece29..50b6fa42 100644 --- a/lib/memtypes.c +++ b/lib/memtypes.c @@ -83,6 +83,7 @@ struct memory_list memory_list_zebra[] = { MTYPE_STATIC_IPV4, "Static IPv4 route" }, { MTYPE_STATIC_IPV6, "Static IPv6 route" }, { MTYPE_RIB_DEST, "RIB destination" }, + { MTYPE_RIB_TABLE_INFO, "RIB table info" }, { -1, NULL }, }; -- cgit v1.2.1