diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-07-25 11:01:59 +0200 | 
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2018-09-05 11:38:13 +0200 | 
| commit | d4cff91a064b593235cf7a510e2383c8443f1fed (patch) | |
| tree | 17de8b82ecbf583403bf8d853392eee40015f575 /isisd/isis_vty_fabricd.c | |
| parent | 9d224819339c0c3e1485eac09daf6178ae94cfb5 (diff) | |
fabricd: add flooding algorithm debugging
Add a command `debug openfabric flooding` to allow verification of
correct operation of the OpenFabric flooding optimization algorithm.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_vty_fabricd.c')
| -rw-r--r-- | isisd/isis_vty_fabricd.c | 32 | 
1 files changed, 32 insertions, 0 deletions
diff --git a/isisd/isis_vty_fabricd.c b/isisd/isis_vty_fabricd.c index 5ef3af0f19..95ebe0de81 100644 --- a/isisd/isis_vty_fabricd.c +++ b/isisd/isis_vty_fabricd.c @@ -55,8 +55,40 @@ DEFUN (no_fabric_tier,  	return CMD_SUCCESS;  } +DEFUN (debug_fabric_flooding, +       debug_fabric_flooding_cmd, +       "debug openfabric flooding", +       DEBUG_STR +       PROTO_HELP +       "Flooding optimization algorithm\n") +{ +	isis->debugs |= DEBUG_FABRICD_FLOODING; +	print_debug(vty, DEBUG_FABRICD_FLOODING, 1); + +	return CMD_SUCCESS; +} + +DEFUN (no_debug_fabric_flooding, +       no_debug_fabric_flooding_cmd, +       "no debug openfabric flooding", +       NO_STR +       UNDEBUG_STR +       PROTO_HELP +       "Flooding optimization algorithm\n") +{ +	isis->debugs &= ~DEBUG_FABRICD_FLOODING; +	print_debug(vty, DEBUG_FABRICD_FLOODING, 0); + +	return CMD_SUCCESS; +} + +  void isis_vty_daemon_init(void)  {  	install_element(ROUTER_NODE, &fabric_tier_cmd);  	install_element(ROUTER_NODE, &no_fabric_tier_cmd); +	install_element(ENABLE_NODE, &debug_fabric_flooding_cmd); +	install_element(ENABLE_NODE, &no_debug_fabric_flooding_cmd); +	install_element(CONFIG_NODE, &debug_fabric_flooding_cmd); +	install_element(CONFIG_NODE, &no_debug_fabric_flooding_cmd);  }  | 
