]> git.proxmox.com Git - mirror_frr.git/commit - lib/zebra.h
zebra: add iterator for walking all tables in RIB
authorAvneesh Sachdev <avneesh@opensourcerouting.org>
Tue, 13 Nov 2012 22:48:55 +0000 (22:48 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 30 Nov 2012 20:41:16 +0000 (21:41 +0100)
commit0915bb0ce2ca6b5fee2cd214be4499eeeaf1c9af
treeeb3cb410ed0dd341e2e565e71d74bba81c0dbf8a
parent1b5ed1b054b955275bb7cf0f80fb7767094bc28b
zebra: add iterator for walking all tables in RIB

* lib/zebra.h

    Add macro ZEBRA_NUM_OF, which returns the number of elements in a
    static array.

  * zebra/rib.h

    Add the rib_tables_iter_t structure and associated functions,
    which allow one to walk all tables in the rib.

  * zebra/zebra_rib.c

    - Add vrf_id_get_next() to retrieve the first VRF id (if any) that
      is greater than a given VRF id.

    - Add rib_tables_iter_next().

Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/zebra.h
zebra/rib.h
zebra/zebra_rib.c