diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-11-14 18:50:37 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-11-14 18:53:03 -0500 |
| commit | f18ba3cd18210fceac80fc1bf21fcb116d4d4397 (patch) | |
| tree | 7ec928e01f625f4114d3c522e6168b9518e8302f /lib/zebra.h | |
| parent | 3d1c148b07c7c81e98fd3059100bd84ba92c4546 (diff) | |
bgpd, lib, staticd, tests: Convert to using FOREACH_AFI_SAFI
Move the FOREACH_AFI_SAFI macro from bgpd.h to zebra.h( GLOBAL's YOUALL )
Then convert all the places that have the two level for loop to
iterate over all afi/safis
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/zebra.h')
| -rw-r--r-- | lib/zebra.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 14d66d6627..ded44ac636 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -359,6 +359,10 @@ typedef enum { SAFI_MAX = 8 } safi_t; +#define FOREACH_AFI_SAFI(afi, safi) \ + for (afi = AFI_IP; afi < AFI_MAX; afi++) \ + for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) + /* Default Administrative Distance of each protocol. */ #define ZEBRA_KERNEL_DISTANCE_DEFAULT 0 #define ZEBRA_CONNECT_DISTANCE_DEFAULT 0 |
