diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-03-26 19:24:45 +0200 |
|---|---|---|
| committer | Mark Stapp <mjs@cisco.com> | 2024-08-27 09:53:02 -0400 |
| commit | 82e52e0f21c12aa5b7270032c32b38e1fa33aa28 (patch) | |
| tree | 6a771925348869c500ab278fd54fb30b267bc7bf /vrrpd | |
| parent | 5dac6961540422a1ca139fae8c5ea9e5a437c4ba (diff) | |
lib: common debug config output
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'vrrpd')
| -rw-r--r-- | vrrpd/vrrp_debug.c | 19 | ||||
| -rw-r--r-- | vrrpd/vrrp_debug.h | 8 | ||||
| -rw-r--r-- | vrrpd/vrrp_vty.c | 8 |
3 files changed, 7 insertions, 28 deletions
diff --git a/vrrpd/vrrp_debug.c b/vrrpd/vrrp_debug.c index ebaeca27d3..ccb0803c0c 100644 --- a/vrrpd/vrrp_debug.c +++ b/vrrpd/vrrp_debug.c @@ -13,13 +13,13 @@ #include "vrrp_debug.h" /* clang-format off */ -struct debug vrrp_dbg_arp = {0, "VRRP ARP"}; -struct debug vrrp_dbg_auto = {0, "VRRP autoconfiguration events"}; -struct debug vrrp_dbg_ndisc = {0, "VRRP Neighbor Discovery"}; -struct debug vrrp_dbg_pkt = {0, "VRRP packets"}; -struct debug vrrp_dbg_proto = {0, "VRRP protocol events"}; -struct debug vrrp_dbg_sock = {0, "VRRP sockets"}; -struct debug vrrp_dbg_zebra = {0, "VRRP Zebra events"}; +struct debug vrrp_dbg_arp = {0, "debug vrrp arp", "VRRP ARP"}; +struct debug vrrp_dbg_auto = {0, "debug vrrp autoconfigure", "VRRP autoconfiguration events"}; +struct debug vrrp_dbg_ndisc = {0, "debug vrrp ndisc", "VRRP Neighbor Discovery"}; +struct debug vrrp_dbg_pkt = {0, "debug vrrp packets", "VRRP packets"}; +struct debug vrrp_dbg_proto = {0, "debug vrrp protocol", "VRRP protocol events"}; +struct debug vrrp_dbg_sock = {0, "debug vrrp sockets", "VRRP sockets"}; +struct debug vrrp_dbg_zebra = {0, "debug vrrp zebra", "VRRP Zebra events"}; struct debug *vrrp_debugs[] = { &vrrp_dbg_arp, @@ -56,11 +56,6 @@ static int vrrp_debug_config_write_helper(struct vty *vty, bool config) return 0; } -int vrrp_config_write_debug(struct vty *vty) -{ - return vrrp_debug_config_write_helper(vty, true); -} - int vrrp_debug_status_write(struct vty *vty) { return vrrp_debug_config_write_helper(vty, false); diff --git a/vrrpd/vrrp_debug.h b/vrrpd/vrrp_debug.h index c1421ebbaa..c8b4c897f0 100644 --- a/vrrpd/vrrp_debug.h +++ b/vrrpd/vrrp_debug.h @@ -28,14 +28,6 @@ extern struct debug vrrp_dbg_zebra; void vrrp_debug_init(void); /* - * Print VRRP debugging configuration. - * - * vty - * VTY to print debugging configuration to. - */ -int vrrp_config_write_debug(struct vty *vty); - -/* * Print VRRP debugging configuration, human readable form. * * vty diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c index fd6cbc8b67..53f66c79c9 100644 --- a/vrrpd/vrrp_vty.c +++ b/vrrpd/vrrp_vty.c @@ -747,13 +747,6 @@ DEFUN_NOSH (show_debugging_vrrp, /* clang-format on */ -static struct cmd_node debug_node = { - .name = "debug", - .node = DEBUG_NODE, - .prompt = "", - .config_write = vrrp_config_write_debug, -}; - static struct cmd_node vrrp_node = { .name = "vrrp", .node = VRRP_NODE, @@ -763,7 +756,6 @@ static struct cmd_node vrrp_node = { void vrrp_vty_init(void) { - install_node(&debug_node); install_node(&vrrp_node); vrf_cmd_init(NULL); if_cmd_init_default(); |
