From 6038fe458461ad76a6809995d6ad9ea1d0b59bbd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 13 Feb 2019 23:23:06 -0500 Subject: [PATCH 1/2] bfdd: Add some code so we can compile from w/ in the bfdd dir Copy pattern of Makefile from other daemons to allow us to compile this thingie(tm) from within the bfdd directory. Signed-off-by: Donald Sharp --- bfdd/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bfdd/Makefile diff --git a/bfdd/Makefile b/bfdd/Makefile new file mode 100644 index 0000000000..dfe78232c4 --- /dev/null +++ b/bfdd/Makefile @@ -0,0 +1,10 @@ +all: ALWAYS + @$(MAKE) -s -C .. bfdd/bfdd +%: ALWAYS + @$(MAKE) -s -C .. bfdd/$@ + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles +.SUFFIXES: From a244e59954caa0f51b0496adfd6e247cd90ffe6f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 13 Feb 2019 23:24:05 -0500 Subject: [PATCH 2/2] bfdd: Add `show debugging [bfd]` command This will prevent vtysh from displaying `command imcomplete` for a `show debugging` issued and we are running this bfd daemon. A quick look showed me that there was not really the ability to turn on/off debugging like other daemons. I imagine future work can be focused here. Signed-off-by: Donald Sharp --- bfdd/bfdd_vty.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 8f8fff6b18..3476e16210 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -968,6 +968,18 @@ static void _bfdd_peer_write_config(struct hash_backet *hb, void *arg) vty_out(vty, " !\n"); } +DEFUN_NOSH(show_debugging_bfd, + show_debugging_bfd_cmd, + "show debugging [bfd]", + SHOW_STR + DEBUG_STR + "BFD daemon\n") +{ + vty_out(vty, "BFD debugging status:\n"); + + return CMD_SUCCESS; +} + static int bfdd_peer_write_config(struct vty *vty) { bfd_id_iterate(_bfdd_peer_write_config, vty); @@ -993,6 +1005,7 @@ void bfdd_vty_init(void) install_element(ENABLE_NODE, &bfd_show_peers_cmd); install_element(ENABLE_NODE, &bfd_show_peer_cmd); install_element(CONFIG_NODE, &bfd_enter_cmd); + install_element(ENABLE_NODE, &show_debugging_bfd_cmd); /* Install BFD node and commands. */ install_node(&bfd_node, bfdd_write_config);