diff options
author | Mark Stapp <mjs@voltanet.io> | 2018-06-12 22:33:30 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2018-07-10 20:07:43 +0200 |
commit | d826a734af340d12296ccb78cba73828ace66468 (patch) | |
tree | 22c74e2c332a3b1a6c9d7bf9a73bccc39127b04c /lib/nexthop_group.h | |
parent | Merge pull request #2636 from ppmathis/cleanup/bgpd (diff) | |
download | frr-d826a734af340d12296ccb78cba73828ace66468.tar.xz frr-d826a734af340d12296ccb78cba73828ace66468.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | lib/nexthop_group.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h index a44f4e354..473ecb34f 100644 --- a/lib/nexthop_group.h +++ b/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; |