summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-04-17 01:24:56 +0200
committerGitHub <noreply@github.com>2020-04-17 01:24:56 +0200
commit2ff99507ad97fed3c2a0910605bd72524f497441 (patch)
treebb013e5a0ce2068d41ef6497b66449a4a5921a16 /bfdd
parentMerge pull request #6239 from ton31337/fix/uint8_t_to_bool_for_any (diff)
parentlib: #define FRR_CMD_NODE_20200416 (diff)
downloadfrr-2ff99507ad97fed3c2a0910605bd72524f497441.tar.xz
frr-2ff99507ad97fed3c2a0910605bd72524f497441.zip
Merge pull request #6135 from opensourcerouting/cli-node-cleanup
*: clean up the mess that is CLI command nodes
Diffstat (limited to 'bfdd')
-rw-r--r--bfdd/bfdd_vty.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c
index f539c6d27..71d0a49f6 100644
--- a/bfdd/bfdd_vty.c
+++ b/bfdd/bfdd_vty.c
@@ -885,16 +885,20 @@ DEFUN_NOSH(show_debugging_bfd,
return CMD_SUCCESS;
}
+static int bfdd_write_config(struct vty *vty);
struct cmd_node bfd_node = {
- BFD_NODE,
- "%s(config-bfd)# ",
- 1,
+ .name = "bfd",
+ .node = BFD_NODE,
+ .parent_node = CONFIG_NODE,
+ .prompt = "%s(config-bfd)# ",
+ .config_write = bfdd_write_config,
};
struct cmd_node bfd_peer_node = {
- BFD_PEER_NODE,
- "%s(config-bfd-peer)# ",
- 1,
+ .name = "bfd peer",
+ .node = BFD_PEER_NODE,
+ .parent_node = BFD_NODE,
+ .prompt = "%s(config-bfd-peer)# ",
};
static int bfdd_write_config(struct vty *vty)
@@ -945,11 +949,11 @@ void bfdd_vty_init(void)
install_element(CONFIG_NODE, &bfd_debug_network_cmd);
/* Install BFD node and commands. */
- install_node(&bfd_node, bfdd_write_config);
+ install_node(&bfd_node);
install_default(BFD_NODE);
/* Install BFD peer node. */
- install_node(&bfd_peer_node, NULL);
+ install_node(&bfd_peer_node);
install_default(BFD_PEER_NODE);
bfdd_cli_init();