1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Conf: Symbol implementation converted from void pointers to union

... and consted some declarations.
This commit is contained in:
Maria Matejka
2019-02-15 13:53:17 +01:00
parent 132529ce89
commit 0b39b1cbb7
18 changed files with 149 additions and 121 deletions

View File

@@ -398,7 +398,7 @@ static rte *
export_filter_(struct channel *c, rte *rt0, rte **rt_free, linpool *pool, int silent)
{
struct proto *p = c->proto;
struct filter *filter = c->out_filter;
const struct filter *filter = c->out_filter;
struct proto_stats *stats = &c->stats;
rte *rt;
int v;
@@ -1362,7 +1362,7 @@ rte_update2(struct channel *c, const net_addr *n, rte *new, struct rte_src *src)
{
struct proto *p = c->proto;
struct proto_stats *stats = &c->stats;
struct filter *filter = c->in_filter;
const struct filter *filter = c->in_filter;
rte *dummy = NULL;
net *nn;
@@ -1503,7 +1503,7 @@ rte_modify(rte *old)
/* Check rtable for best route to given net whether it would be exported do p */
int
rt_examine(rtable *t, net_addr *a, struct proto *p, struct filter *filter)
rt_examine(rtable *t, net_addr *a, struct proto *p, const struct filter *filter)
{
net *n = net_find(t, a);
rte *rt = n ? n->routes : NULL;
@@ -2106,13 +2106,13 @@ rt_new_table(struct symbol *s, uint addr_type)
{
/* Hack that allows to 'redefine' the master table */
if ((s->class == SYM_TABLE) &&
(s->def == new_config->def_tables[addr_type]) &&
(s->table == new_config->def_tables[addr_type]) &&
((addr_type == NET_IP4) || (addr_type == NET_IP6)))
return s->def;
return s->table;
struct rtable_config *c = cfg_allocz(sizeof(struct rtable_config));
cf_define_symbol(s, SYM_TABLE, c);
cf_define_symbol(s, SYM_TABLE, table, c);
c->name = s->name;
c->addr_type = addr_type;
c->gc_max_ops = 1000;
@@ -2171,7 +2171,7 @@ static struct rtable_config *
rt_find_table_config(struct config *cf, char *name)
{
struct symbol *sym = cf_find_symbol(cf, name);
return (sym && (sym->class == SYM_TABLE)) ? sym->def : NULL;
return (sym && (sym->class == SYM_TABLE)) ? sym->table : NULL;
}
/**