]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: add way to determine VRF/AFI/SAFI of table
authorAvneesh Sachdev <avneesh@opensourcerouting.org>
Tue, 13 Nov 2012 22:48:54 +0000 (22:48 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 30 Nov 2012 20:41:16 +0000 (21:41 +0100)
commit1b5ed1b054b955275bb7cf0f80fb7767094bc28b
treeb8d886b85615f1b05679e6879c961e5dcb1496c4
parent9fd92e3c4bdcc78e0f0d94d53a2d4c7b0e893fcb
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 <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/memtypes.c
zebra/rib.h
zebra/zebra_rib.c