lib: do not include bgpd headers in route_opaque.h

Duplicate a couple of definitions in order to remove the bgpd
includes from this libfrr header. This is necessary to fix some
name collisions like PREFIX_LIST_IN being defined differently on
multiple daemons (as soon as other daemons start including
route_opaque.h).

Including daemon headers on libfrr headers is a bad practice and
should be avoided whenever possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2021-09-20 22:11:18 -03:00
parent 4ac61f7a2a
commit 959331a339
2 changed files with 8 additions and 3 deletions

View file

@ -65,6 +65,8 @@
#include "bgpd/bgp_evpn_mh.h"
#include "bgpd/bgp_mac.h"
#include "bgpd/bgp_trace.h"
#include "bgpd/bgp_community.h"
#include "bgpd/bgp_lcommunity.h"
/* All information about zebra. */
struct zclient *zclient = NULL;

View file

@ -24,9 +24,12 @@
#include "assert.h"
#include "zclient.h"
#include "bgpd/bgp_aspath.h"
#include "bgpd/bgp_community.h"
#include "bgpd/bgp_lcommunity.h"
/* copied from bgpd/bgp_community.h */
#define COMMUNITY_SIZE 4
/* copied from bgpd/bgp_lcommunity.h */
#define LCOMMUNITY_SIZE 12
/* copied from bgpd/bgp_route.h */
#define BGP_MAX_SELECTION_REASON_STR_BUF 32
struct bgp_zebra_opaque {
char aspath[256];