From beecba6e17ae66641c8849296db47639e3f3bb03 Mon Sep 17 00:00:00 2001 From: Sai Gomathi N Date: Sun, 25 Sep 2022 23:22:31 -0700 Subject: [PATCH] pim6d: Add 'debug mld packets' Implementing mld packets debug to information about packet generation for sending and about packet handling from a received packet. Signed-off-by: Sai Gomathi N --- pimd/pim6_cmd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index e86e2f972e..1df170df07 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1597,6 +1597,22 @@ DEFPY (debug_mld_events, return CMD_SUCCESS; } +DEFPY (debug_mld_packets, + debug_mld_packets_cmd, + "[no] debug mld packets", + NO_STR + DEBUG_STR + DEBUG_MLD_STR + DEBUG_MLD_PACKETS_STR) +{ + if (!no) + PIM_DO_DEBUG_GM_PACKETS; + else + PIM_DONT_DEBUG_GM_PACKETS; + + return CMD_SUCCESS; +} + void pim_cmd_init(void) { if_cmd_init(pim_interface_config_write); @@ -1731,6 +1747,7 @@ void pim_cmd_init(void) install_element(ENABLE_NODE, &debug_mroute6_detail_cmd); install_element(ENABLE_NODE, &debug_mld_cmd); install_element(ENABLE_NODE, &debug_mld_events_cmd); + install_element(ENABLE_NODE, &debug_mld_packets_cmd); install_element(CONFIG_NODE, &debug_pimv6_cmd); install_element(CONFIG_NODE, &debug_pimv6_nht_cmd); @@ -1746,4 +1763,5 @@ void pim_cmd_init(void) install_element(CONFIG_NODE, &debug_mroute6_detail_cmd); install_element(CONFIG_NODE, &debug_mld_cmd); install_element(CONFIG_NODE, &debug_mld_events_cmd); + install_element(CONFIG_NODE, &debug_mld_packets_cmd); } -- 2.39.5