summaryrefslogtreecommitdiffstats
path: root/vrrpd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-26 19:25:21 +0100
committerMark Stapp <mjs@cisco.com>2024-08-27 15:53:02 +0200
commit830972cab211a2f7ad82d7635ad9111afac8f47b (patch)
treed33c9a59f0e3fefbcd9173684bacffbf41127f63 /vrrpd
parentlib: common debug config output (diff)
downloadfrr-830972cab211a2f7ad82d7635ad9111afac8f47b.tar.xz
frr-830972cab211a2f7ad82d7635ad9111afac8f47b.zip
lib: common debug status output
Implement common code for debug status 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.c39
-rw-r--r--vrrpd/vrrp_vty.c2
2 files changed, 0 insertions, 41 deletions
diff --git a/vrrpd/vrrp_debug.c b/vrrpd/vrrp_debug.c
index ccb0803c0..fd0edcfc7 100644
--- a/vrrpd/vrrp_debug.c
+++ b/vrrpd/vrrp_debug.c
@@ -20,47 +20,8 @@ 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,
- &vrrp_dbg_auto,
- &vrrp_dbg_ndisc,
- &vrrp_dbg_pkt,
- &vrrp_dbg_proto,
- &vrrp_dbg_sock,
- &vrrp_dbg_zebra
-};
-
-const char *vrrp_debugs_conflines[] = {
- "debug vrrp arp",
- "debug vrrp autoconfigure",
- "debug vrrp ndisc",
- "debug vrrp packets",
- "debug vrrp protocol",
- "debug vrrp sockets",
- "debug vrrp zebra",
-};
/* clang-format on */
-static int vrrp_debug_config_write_helper(struct vty *vty, bool config)
-{
- uint32_t mode = DEBUG_MODE_ALL;
-
- if (config)
- mode = DEBUG_MODE_CONF;
-
- for (unsigned int i = 0; i < array_size(vrrp_debugs); i++)
- if (DEBUG_MODE_CHECK(vrrp_debugs[i], mode))
- vty_out(vty, "%s\n", vrrp_debugs_conflines[i]);
-
- return 0;
-}
-
-int vrrp_debug_status_write(struct vty *vty)
-{
- return vrrp_debug_config_write_helper(vty, false);
-}
-
void vrrp_debug_set(struct interface *ifp, uint8_t vrid, int vtynode,
bool onoff, bool proto, bool autoconf, bool pkt, bool sock,
bool ndisc, bool arp, bool zebra)
diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c
index 53f66c79c..985354af3 100644
--- a/vrrpd/vrrp_vty.c
+++ b/vrrpd/vrrp_vty.c
@@ -738,8 +738,6 @@ DEFUN_NOSH (show_debugging_vrrp,
{
vty_out(vty, "VRRP debugging status:\n");
- vrrp_debug_status_write(vty);
-
cmd_show_lib_debugs(vty);
return CMD_SUCCESS;