mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Squashing the route attribute structure into one level.
For now, all route attributes are stored as eattrs in ea_list. This should make route manipulation easier and it also allows for a layered approach of route attributes where updates from filters will be stored as an overlay over the previous version.
This commit is contained in:
19
nest/rt.h
19
nest/rt.h
@@ -143,7 +143,7 @@ struct hostentry {
|
||||
struct hostentry *next; /* Next in hash chain */
|
||||
unsigned hash_key; /* Hash key */
|
||||
unsigned uc; /* Use count */
|
||||
struct rta *src; /* Source rta entry */
|
||||
ea_list *src; /* Source attributes */
|
||||
byte nexthop_linkable; /* Nexthop list is completely non-device */
|
||||
u32 igp_metric; /* Chosen route IGP metric */
|
||||
};
|
||||
@@ -185,7 +185,7 @@ static inline net *net_get(rtable *tab, const net_addr *addr) { return (net *) f
|
||||
net *net_get(rtable *tab, const net_addr *addr);
|
||||
net *net_route(rtable *tab, const net_addr *n);
|
||||
rte *rte_find(net *net, struct rte_src *src);
|
||||
rte *rte_get_temp(struct rta *, struct rte_src *src);
|
||||
rte *rte_get_temp(ea_list *, struct rte_src *src);
|
||||
void rte_update2(struct channel *c, const net_addr *n, rte *new, struct rte_src *src);
|
||||
/* rte_update() moved to protocol.h to avoid dependency conflicts */
|
||||
int rt_examine(rtable *t, net_addr *a, struct proto *p, const struct filter *filter);
|
||||
@@ -198,7 +198,7 @@ void rte_dump(rte *);
|
||||
void rte_free(rte *);
|
||||
rte *rte_do_cow(rte *);
|
||||
static inline rte * rte_cow(rte *r) { return (r->flags & REF_COW) ? rte_do_cow(r) : r; }
|
||||
rte *rte_cow_rta(rte *r, linpool *lp);
|
||||
rte *rte_cow_rta(rte *r);
|
||||
void rt_dump(rtable *);
|
||||
void rt_dump_all(void);
|
||||
int rt_feed_channel(struct channel *c);
|
||||
@@ -290,18 +290,7 @@ struct hostentry_adata {
|
||||
void
|
||||
ea_set_hostentry(ea_list **to, struct rtable *dep, struct rtable *tab, ip_addr gw, ip_addr ll, u32 lnum, u32 labels[lnum]);
|
||||
|
||||
/*
|
||||
struct hostentry * rt_get_hostentry(rtable *tab, ip_addr a, ip_addr ll, rtable *dep);
|
||||
void rta_apply_hostentry(rta *a, struct hostentry *he, u32 lnum, u32 labels[lnum]);
|
||||
|
||||
static inline void
|
||||
rta_set_recursive_next_hop(rtable *dep, rta *a, rtable *tab, ip_addr gw, ip_addr ll, u32 lnum, u32 labels[lnum])
|
||||
{
|
||||
rta_apply_hostentry(a, rt_get_hostentry(tab, gw, ll, dep), lnum, labels);
|
||||
}
|
||||
*/
|
||||
|
||||
int rt_flowspec_check(rtable *tab_ip, rtable *tab_flow, const net_addr *n, rta *a, int interior);
|
||||
int rt_flowspec_check(rtable *tab_ip, rtable *tab_flow, const net_addr *n, ea_list *a, int interior);
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user