diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-11-04 08:47:46 +0000 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-11-07 06:47:51 -0500 |
| commit | 6de9f7fbf582cf9ea10803437ce7ec845c43d67a (patch) | |
| tree | c630c052f068734a4852e074e181ba16d4493bb5 /lib | |
| parent | 42ddcf71e58300c7b594ac3964977625355cb24c (diff) | |
*: Move distance related defines into their own header
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/frrdistance.h | 35 | ||||
| -rw-r--r-- | lib/subdir.am | 1 | ||||
| -rw-r--r-- | lib/zebra.h | 22 |
3 files changed, 36 insertions, 22 deletions
diff --git a/lib/frrdistance.h b/lib/frrdistance.h new file mode 100644 index 0000000000..d2fa76e610 --- /dev/null +++ b/lib/frrdistance.h @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Zebra distance header + * Copyright (C) 2023 NVIDIA Corporation + * Donald Sharp + * + * Distance related defines. FRR needs a common set + * of values for distance. + */ +#ifndef __FRRDISTANCE_H__ +#define __FRRDISTANCE_H__ + +/* Default Administrative Distance of each protocol. */ +#define ZEBRA_KERNEL_DISTANCE_DEFAULT 0 +#define ZEBRA_CONNECT_DISTANCE_DEFAULT 0 +#define ZEBRA_STATIC_DISTANCE_DEFAULT 1 +#define ZEBRA_RIP_DISTANCE_DEFAULT 120 +#define ZEBRA_RIPNG_DISTANCE_DEFAULT 120 +#define ZEBRA_OSPF_DISTANCE_DEFAULT 110 +#define ZEBRA_OSPF6_DISTANCE_DEFAULT 110 +#define ZEBRA_ISIS_DISTANCE_DEFAULT 115 +#define ZEBRA_IBGP_DISTANCE_DEFAULT 200 +#define ZEBRA_EBGP_DISTANCE_DEFAULT 20 +#define ZEBRA_TABLE_DISTANCE_DEFAULT 15 +#define ZEBRA_TABLEDIRECT_DISTANCE_DEFAULT 14 +#define ZEBRA_EIGRP_DISTANCE_DEFAULT 90 +#define ZEBRA_NHRP_DISTANCE_DEFAULT 10 +#define ZEBRA_LDP_DISTANCE_DEFAULT 150 +#define ZEBRA_BABEL_DISTANCE_DEFAULT 100 +#define ZEBRA_SHARP_DISTANCE_DEFAULT 150 +#define ZEBRA_PBR_DISTANCE_DEFAULT 200 +#define ZEBRA_OPENFABRIC_DISTANCE_DEFAULT 115 +#define ZEBRA_MAX_DISTANCE_DEFAULT 255 + +#endif diff --git a/lib/subdir.am b/lib/subdir.am index d7b28ffbd5..0c718d12aa 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -219,6 +219,7 @@ pkginclude_HEADERS += \ lib/filter.h \ lib/flex_algo.h \ lib/freebsd-queue.h \ + lib/frrdistance.h \ lib/frrlua.h \ lib/frrscript.h \ lib/frr_pthread.h \ diff --git a/lib/zebra.h b/lib/zebra.h index 378ccd84d0..e5021df22b 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -350,28 +350,6 @@ typedef enum { for (afi = AFI_IP; afi < AFI_MAX; afi++) \ for (safi = SAFI_UNICAST; safi <= SAFI_MPLS_VPN; safi++) -/* Default Administrative Distance of each protocol. */ -#define ZEBRA_KERNEL_DISTANCE_DEFAULT 0 -#define ZEBRA_CONNECT_DISTANCE_DEFAULT 0 -#define ZEBRA_STATIC_DISTANCE_DEFAULT 1 -#define ZEBRA_RIP_DISTANCE_DEFAULT 120 -#define ZEBRA_RIPNG_DISTANCE_DEFAULT 120 -#define ZEBRA_OSPF_DISTANCE_DEFAULT 110 -#define ZEBRA_OSPF6_DISTANCE_DEFAULT 110 -#define ZEBRA_ISIS_DISTANCE_DEFAULT 115 -#define ZEBRA_IBGP_DISTANCE_DEFAULT 200 -#define ZEBRA_EBGP_DISTANCE_DEFAULT 20 -#define ZEBRA_TABLE_DISTANCE_DEFAULT 15 -#define ZEBRA_TABLEDIRECT_DISTANCE_DEFAULT 14 -#define ZEBRA_EIGRP_DISTANCE_DEFAULT 90 -#define ZEBRA_NHRP_DISTANCE_DEFAULT 10 -#define ZEBRA_LDP_DISTANCE_DEFAULT 150 -#define ZEBRA_BABEL_DISTANCE_DEFAULT 100 -#define ZEBRA_SHARP_DISTANCE_DEFAULT 150 -#define ZEBRA_PBR_DISTANCE_DEFAULT 200 -#define ZEBRA_OPENFABRIC_DISTANCE_DEFAULT 115 -#define ZEBRA_MAX_DISTANCE_DEFAULT 255 - /* Flag manipulation macros. */ #define CHECK_FLAG(V,F) ((V) & (F)) #define SET_FLAG(V,F) (V) |= (F) |
