summaryrefslogtreecommitdiff
path: root/lib/route_opaque.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-04-18 21:53:19 +0300
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-05-14 22:12:33 +0300
commit94effaf032edc269f79b61fd8df04401d6e29ee2 (patch)
tree807fa8f6d552fa086e373887741ce0ccd6309200 /lib/route_opaque.h
parent638fc64c64d637607554bc4b132dd20e4ff30e1c (diff)
zebra: Send more OPAQUE data from BGP
This includes community and large-community data. ``` exit1-debian-9# show ip route 172.16.16.1/32 Routing entry for 172.16.16.1/32 Known via "bgp", distance 20, metric 0, best Last update 00:00:23 ago * 192.168.0.2, via eth1, weight 1 AS-Path : 65030 Communities : 65001:1 65001:2 65001:3 65001:4 65001:5 65001:6 Large-Communities: 65001:123:1 65001:123:2 ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/route_opaque.h')
-rw-r--r--lib/route_opaque.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/route_opaque.h b/lib/route_opaque.h
new file mode 100644
index 0000000000..599a0363eb
--- /dev/null
+++ b/lib/route_opaque.h
@@ -0,0 +1,38 @@
+/* Opaque data for Zebra from other daemons.
+ *
+ * Copyright (C) 2021 Donatas Abraitis <donatas.abraitis@gmail.com>
+ *
+ * This file is part of FRRouting (FRR).
+ *
+ * FRR is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2, or (at your option) any later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef FRR_ROUTE_OPAQUE_H
+#define FRR_ROUTE_OPAQUE_H
+
+#include "bgpd/bgp_aspath.h"
+#include "bgpd/bgp_community.h"
+#include "bgpd/bgp_lcommunity.h"
+
+struct bgp_zebra_opaque {
+ char aspath[ASPATH_STR_DEFAULT_LEN];
+
+ /* Show at least 10 communities AA:BB */
+ char community[COMMUNITY_SIZE * 20];
+
+ /* Show at least 10 large-communities AA:BB:CC */
+ char lcommunity[LCOMMUNITY_SIZE * 30];
+};
+
+#endif /* FRR_ROUTE_OPAQUE_H */