From f4a60a9bc429c28cb397402331dc01a789197450 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 26 Jan 2016 11:48:58 +0100 Subject: Channels - explicit links between protocols and tables The patch adds support for channels, structures connecting protocols and tables and handling most interactions between them. The documentation is missing yet. --- conf/conf.c | 6 ++++-- conf/conf.h | 2 +- conf/confbase.Y | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'conf') diff --git a/conf/conf.c b/conf/conf.c index f66e3561..50e5944b 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -136,12 +136,14 @@ config_parse(struct config *c) protos_preconfig(c); rt_preconfig(c); cf_parse(); - protos_postconfig(c); + if (EMPTY_LIST(c->protos)) cf_error("No protocol is specified in the config file"); - /* XXXX */ + + /* if (!c->router_id) cf_error("Router ID must be configured manually"); + */ done = 1; diff --git a/conf/conf.h b/conf/conf.h index 1e142bab..1c4f7fce 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -24,7 +24,7 @@ struct config { int mrtdump_file; /* Configured MRTDump file (sysdep, fd in unix) */ char *syslog_name; /* Name used for syslog (NULL -> no syslog) */ - struct rtable_config *master_rtc; /* Configuration of master routing table */ + struct rtable_config *def_tables[NET_MAX]; /* Default routing tables for each network */ struct iface_patt *router_id_from; /* Configured list of router ID iface patterns */ u32 router_id; /* Our Router ID */ diff --git a/conf/confbase.Y b/conf/confbase.Y index 94a20fe7..22aee770 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -46,6 +46,7 @@ CF_DECLS struct symbol *s; char *t; struct rtable_config *r; + struct channel_config *cc; struct f_inst *x; struct filter *f; struct f_tree *e; @@ -61,6 +62,7 @@ CF_DECLS bird_clock_t time; struct f_prefix px; struct proto_spec ps; + struct channel_limit cl; struct timeformat *tf; } -- cgit v1.2.3