diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-08-20 02:25:12 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-08-23 22:45:17 +0200 |
commit | bb1b9c47ca090ce4484e1f8061f17b5c33f578ee (patch) | |
tree | 0b6f114b78a84f0dffeb7de41a685d33e152879e /gdb | |
parent | zserv: identify label type based on the client protocol (diff) | |
download | frr-bb1b9c47ca090ce4484e1f8061f17b5c33f578ee.tar.xz frr-bb1b9c47ca090ce4484e1f8061f17b5c33f578ee.zip |
lib: updates to zapi_route
This patch introduces the following changes to the zapi_route structure
and associated code:
* Use a fixed-size array to store the nexthops instead of a pointer. This
makes the zapi_route() function much easier to use when we have multiple
nexthops to send. It's also much more efficient to put everything on
the stack rather than allocating an array in the heap every time we
need to send a route to zebra;
* Use the new 'zapi_nexthop' structure. This will allow the client daemons
to send labeled routes without having to allocate memory for the labels
(the 'nexthop' structure was designed to be memory efficient and doesn't
have room for MPLS labels, only a pointer). Also, 'zapi_nexthop' is more
compact and more clean from an API perspective;
* Embed the route prefix inside the zapi_route structure. Since the
route's prefix is sent along with its nexthops and attributes, it makes
sense to pack everything inside the same structure.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'gdb')
0 files changed, 0 insertions, 0 deletions