summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorIgor Putovny <igor.putovny@nic.cz>2023-06-21 13:15:07 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-09-26 15:46:24 +0200
commit977b82fba49b22d9548546d88b105945921efaed (patch)
treec62f27e9923c25336263883e2c069f8e87d150dc /nest/route.h
parent0a729b509c2c4476cbf66c64620a863e6a381c8c (diff)
Basic route aggregation
Add a new protocol offering route aggregation. User can specify list of route attributes in the configuration file and run route aggregation on the export side of the pipe protocol. Routes are sorted and for every group of equivalent routes new route is created and exported to the routing table. It is also possible to specify filter which will run for every route before aggregation. Furthermore, it will be possible to set attributes of new routes according to attributes of the aggregated routes. This is a work in progress. Original work by Igor Putovny, subsequent cleanups and finalization by Maria Matejka.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h
index 7aec7117..feb1fa60 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -342,6 +342,8 @@ void rt_prune_sync(rtable *t, int all);
int rte_update_out(struct channel *c, const net_addr *n, rte *new, rte *old0, int refeed);
struct rtable_config *rt_new_table(struct symbol *s, uint addr_type);
+int rte_same(rte *x, rte *y);
+
static inline int rt_is_ip(rtable *tab)
{ return (tab->addr_type == NET_IP4) || (tab->addr_type == NET_IP6); }
@@ -474,7 +476,8 @@ typedef struct rta {
#define RTS_BABEL 13 /* Babel route */
#define RTS_RPKI 14 /* Route Origin Authorization */
#define RTS_PERF 15 /* Perf checker */
-#define RTS_MAX 16
+#define RTS_AGGREGATED 16 /* Aggregated route */
+#define RTS_MAX 17
#define RTD_NONE 0 /* Undefined next hop */
#define RTD_UNICAST 1 /* Next hop is neighbor router */