libs: add ALL_NEXTHOPS_PTR iterator macro

Because sometimes we have a pointer to a nexthop_group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2018-06-12 16:33:30 -04:00
parent 6b479dff80
commit d826a734af

View File

@ -56,6 +56,11 @@ void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
(nhop); \
(nhop) = nexthop_next(nhop)
#define ALL_NEXTHOPS_PTR(head, nhop) \
(nhop) = ((head)->nexthop); \
(nhop); \
(nhop) = nexthop_next(nhop)
struct nexthop_hold {
char *nhvrf_name;