diff options
author | Igor Putovny <igor.putovny@nic.cz> | 2023-06-21 13:15:07 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-09-26 15:46:24 +0200 |
commit | 977b82fba49b22d9548546d88b105945921efaed (patch) | |
tree | c62f27e9923c25336263883e2c069f8e87d150dc /nest/attrs.h | |
parent | 0a729b509c2c4476cbf66c64620a863e6a381c8c (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/attrs.h')
-rw-r--r-- | nest/attrs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nest/attrs.h b/nest/attrs.h index fcd5ac16..aee3468b 100644 --- a/nest/attrs.h +++ b/nest/attrs.h @@ -51,6 +51,7 @@ u32 as_path_get_last_nonaggregated(const struct adata *path); int as_path_contains(const struct adata *path, u32 as, int min); int as_path_match_set(const struct adata *path, const struct f_tree *set); const struct adata *as_path_filter(struct linpool *pool, const struct adata *path, const struct f_val *set, int pos); +int as_path_compare(const struct adata *path1, const struct adata *path2); int as_path_walk(const struct adata *path, uint *pos, uint *val); static inline struct adata *as_path_prepend(struct linpool *pool, const struct adata *path, u32 as) @@ -238,6 +239,7 @@ int lc_set_max(const struct adata *list, lcomm *val); int int_set_walk(const struct adata *list, uint *pos, u32 *val); int ec_set_walk(const struct adata *list, uint *pos, u64 *val); int lc_set_walk(const struct adata *list, uint *pos, lcomm *val); +int rte_set_walk(const struct adata *list, u32 *pos, struct rte **val); void ec_set_sort_x(struct adata *set); /* Sort in place */ |