Added configuration of default protocol debugging flags.
This commit is contained in:
parent
3eb0b586ca
commit
f30b86f9d5
4 changed files with 11 additions and 2 deletions
|
@ -43,7 +43,7 @@ config_alloc(byte *name)
|
||||||
int
|
int
|
||||||
config_parse(struct config *c)
|
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;
|
new_config = c;
|
||||||
cfg_mem = c->mem;
|
cfg_mem = c->mem;
|
||||||
if (setjmp(conf_jmpbuf))
|
if (setjmp(conf_jmpbuf))
|
||||||
|
|
|
@ -21,6 +21,7 @@ struct config {
|
||||||
list logfiles; /* Configured log fils (sysdep) */
|
list logfiles; /* Configured log fils (sysdep) */
|
||||||
struct rtable_config *master_rtc; /* Configuration of master routing table */
|
struct rtable_config *master_rtc; /* Configuration of master routing table */
|
||||||
u32 router_id; /* Our Router ID */
|
u32 router_id; /* Our Router ID */
|
||||||
|
unsigned int proto_default_debug; /* Default protocol debug mask */
|
||||||
char *err_msg; /* Parser error message */
|
char *err_msg; /* Parser error message */
|
||||||
int err_lino; /* Line containing error */
|
int err_lino; /* Line containing error */
|
||||||
char *file_name; /* Name of configuration file */
|
char *file_name; /* Name of configuration file */
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#table testable;
|
#table testable;
|
||||||
|
|
||||||
|
debug protocols all;
|
||||||
|
|
||||||
#protocol rip MyRIP_test {
|
#protocol rip MyRIP_test {
|
||||||
# preference xyzzy;
|
# preference xyzzy;
|
||||||
# debug all;
|
# debug all;
|
||||||
|
|
|
@ -19,7 +19,7 @@ CF_DECLS
|
||||||
|
|
||||||
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
|
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
|
||||||
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
|
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,
|
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)
|
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 */
|
/* Interface patterns */
|
||||||
|
|
||||||
iface_patt:
|
iface_patt:
|
||||||
|
|
Loading…
Reference in a new issue