From: Igor Ryzhov Date: Tue, 24 Aug 2021 14:42:37 +0000 (+0300) Subject: lib: remove the dependency on bgpd code X-Git-Tag: base_8.1~154^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=14b066917b38b609da70026a6080eea00a927b04;p=mirror%2Ffrr.git lib: remove the dependency on bgpd code The library code should not depend on a specific daemon's code. Signed-off-by: Igor Ryzhov --- diff --git a/bgpd/bgp_ecommunity.h b/bgpd/bgp_ecommunity.h index a9dc2aeaa1..03b23fcd37 100644 --- a/bgpd/bgp_ecommunity.h +++ b/bgpd/bgp_ecommunity.h @@ -151,12 +151,6 @@ struct ecommunity_val_ipv6 { char val[IPV6_ECOMMUNITY_SIZE]; }; -enum ecommunity_lb_type { - EXPLICIT_BANDWIDTH, - CUMULATIVE_BANDWIDTH, - COMPUTED_BANDWIDTH -}; - #define ecom_length_size(X, Y) ((X)->size * (Y)) /* diff --git a/bgpd/bgp_routemap_nb_config.c b/bgpd/bgp_routemap_nb_config.c index 398e7323db..d7ba986a2f 100644 --- a/bgpd/bgp_routemap_nb_config.c +++ b/bgpd/bgp_routemap_nb_config.c @@ -25,7 +25,6 @@ #include "lib/routemap.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_routemap_nb.h" -#include "bgpd/bgp_ecommunity.h" /* Add bgp route map rule. */ static int bgp_route_match_add(struct route_map_index *index, diff --git a/lib/routemap.h b/lib/routemap.h index 4445085001..1fbd142ad2 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -379,6 +379,12 @@ DECLARE_QOBJ_TYPE(route_map); #define IS_SET_BGP_EVPN_GATEWAY_IP_IPV6(A) \ (strmatch(A, "frr-bgp-route-map:set-evpn-gateway-ip-ipv6")) +enum ecommunity_lb_type { + EXPLICIT_BANDWIDTH, + CUMULATIVE_BANDWIDTH, + COMPUTED_BANDWIDTH +}; + /* Prototypes. */ extern void route_map_init(void); diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index 77455d991a..58c62e614f 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -25,7 +25,6 @@ #include "lib/command.h" #include "lib/northbound_cli.h" #include "lib/routemap.h" -#include "bgpd/bgp_ecommunity.h" #ifndef VTYSH_EXTRACT_PL #include "lib/routemap_cli_clippy.c"