summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/route_opaque.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/route_opaque.h b/lib/route_opaque.h
index c5e7d6a327..bf6081c054 100644
--- a/lib/route_opaque.h
+++ b/lib/route_opaque.h
@@ -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];
@@ -44,7 +47,15 @@ struct bgp_zebra_opaque {
char selection_reason[BGP_MAX_SELECTION_REASON_STR_BUF];
};
+struct ospf_zebra_opaque {
+ char path_type[32];
+ char area_id[INET_ADDRSTRLEN];
+ char tag[16];
+};
+
static_assert(sizeof(struct bgp_zebra_opaque) <= ZAPI_MESSAGE_OPAQUE_LENGTH,
"BGP opaque data shouldn't be larger than zebra's buffer");
+static_assert(sizeof(struct ospf_zebra_opaque) <= ZAPI_MESSAGE_OPAQUE_LENGTH,
+ "OSPF opaque data shouldn't be larger than zebra's buffer");
#endif /* FRR_ROUTE_OPAQUE_H */