Skip to content
Permalink
Browse files

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>
  • Loading branch information...
mjstapp committed Jun 12, 2018
1 parent 6b479df commit d826a734af340d12296ccb78cba73828ace66468
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/nexthop_group.h
@@ -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;

0 comments on commit d826a73

Please sign in to comment.
You can’t perform that action at this time.