]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bfdd: Add `show debugging [bfd]` command
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 14 Feb 2019 04:24:05 +0000 (23:24 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 14 Feb 2019 04:24:05 +0000 (23:24 -0500)
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 <sharpd@cumulusnetworks.com>
bfdd/bfdd_vty.c

index 8f8fff6b1837295139e65c709ff94d3522eef18f..3476e16210b8534f73544d03bad62ef5b820f5ac 100644 (file)
@@ -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);