]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: make bgp_table a wrapper around table library
authorAvneesh Sachdev <avneesh@opensourcerouting.org>
Fri, 17 Aug 2012 15:19:49 +0000 (08:19 -0700)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 26 Sep 2012 19:50:48 +0000 (21:50 +0200)
commit67174041d2d9d8908f8b2c915bc0d186d8442c68
treeb57edeae37701055c3c21b79ce51fcbc5069e704
parentf9c1b7bb9b98342f1f3b0bfe3af01844f364dce9
bgpd: make bgp_table a wrapper around table library

Make the BGP table code a thin wrapper around the table implementation
in libzebra.

  * bgpd/bgp_table.[ch]

    - Use the ROUTE_NODE_FIELDS macro to embed the fields of a
      route_node in the bgp_node structure.

    - Add a route_table field to the bgp_table structure.

      Initialize the route_table with a delegate, such that the nodes
      in the table are bgp_node structures.

    - Add inline wrappers that call route_table functions underneath,
      and accept/return the correct BGP types.

  * bgpd/bgp_route.c

    Change some code to use inline wrappers instead of accessing
    fields of nodes/tables directly. The latter does not always work
    because the types of some fields need to be translated now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c
bgpd/bgp_table.c
bgpd/bgp_table.h