summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-03-07 22:50:03 +0100
committerMartin Mares <mj@ucw.cz>2000-03-07 22:50:03 +0100
commitf30b86f9d5004a3e159c385269e76efc71b1566a (patch)
tree0e81339b3882b3a6083f0f4a20ef6e0b8ed195b3
parent3eb0b586ca93b1d0d34f935cac8524e02f708126 (diff)
downloadbird-f30b86f9d5004a3e159c385269e76efc71b1566a.tar
bird-f30b86f9d5004a3e159c385269e76efc71b1566a.zip
Added configuration of default protocol debugging flags.
-rw-r--r--conf/conf.c2
-rw-r--r--conf/conf.h1
-rw-r--r--doc/bird.conf.example2
-rw-r--r--nest/config.Y8
4 files changed, 11 insertions, 2 deletions
diff --git a/conf/conf.c b/conf/conf.c
index c3f5234..bf58631 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -43,7 +43,7 @@ config_alloc(byte *name)
int
config_parse(struct config *c)
{
- debug("Parsing configuration file `%s'\n", c->file_name);
+ DBG("Parsing configuration file `%s'\n", c->file_name);
new_config = c;
cfg_mem = c->mem;
if (setjmp(conf_jmpbuf))
diff --git a/conf/conf.h b/conf/conf.h
index 5b80b0d..78ab04a 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -21,6 +21,7 @@ struct config {
list logfiles; /* Configured log fils (sysdep) */
struct rtable_config *master_rtc; /* Configuration of master routing table */
u32 router_id; /* Our Router ID */
+ unsigned int proto_default_debug; /* Default protocol debug mask */
char *err_msg; /* Parser error message */
int err_lino; /* Line containing error */
char *file_name; /* Name of configuration file */
diff --git a/doc/bird.conf.example b/doc/bird.conf.example
index d37a2a7..cf3b36b 100644
--- a/doc/bird.conf.example
+++ b/doc/bird.conf.example
@@ -16,6 +16,8 @@
#table testable;
+debug protocols all;
+
#protocol rip MyRIP_test {
# preference xyzzy;
# debug all;
diff --git a/nest/config.Y b/nest/config.Y
index 9fce23a..a4863dd 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -19,7 +19,7 @@ CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
-CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS)
+CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS)
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
RIP, RIP_EXT, OSPF, OSPF_EXT, OSPF_IA, OSPF_BOUNDARY, BGP, PIPE)
@@ -110,6 +110,12 @@ rtable:
}
;
+CF_ADDTO(conf, debug_default)
+
+debug_default:
+ DEBUG PROTOCOLS debug_mask { new_config->proto_default_debug = $3; }
+ ;
+
/* Interface patterns */
iface_patt: