]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added configuration of default protocol debugging flags.
authorMartin Mares <mj@ucw.cz>
Tue, 7 Mar 2000 21:50:03 +0000 (21:50 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 7 Mar 2000 21:50:03 +0000 (21:50 +0000)
conf/conf.c
conf/conf.h
doc/bird.conf.example
nest/config.Y

index c3f5234472bcf0254bd9a89d2e26a0d3a85218a0..bf586315182d25fc6fe31aed8045315de309b781 100644 (file)
@@ -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))
index 5b80b0dd14a9de13b92863c564b0cdc8fdfac1ea..78ab04a982579d04e57a614e387b76d8ed2e8a1b 100644 (file)
@@ -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 */
index d37a2a7ddaea37c1ab28719b24df1636bcbd966b..cf3b36b6a7f518c617183823281fa15c048bba0f 100644 (file)
@@ -16,6 +16,8 @@
 
 #table testable;
 
+debug protocols all;
+
 #protocol rip MyRIP_test {
 #      preference xyzzy;
 #      debug all;
index 9fce23a4dce6d4abff69f0116436a9270e99cac2..a4863dd29eab1bac6ad9227896528ec2dfcf2831 100644 (file)
@@ -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: