diff options
| author | Madhuri Kuruganti <maduri111@gmail.com> | 2022-09-04 18:16:09 +0530 |
|---|---|---|
| committer | Madhuri Kuruganti <maduri111@gmail.com> | 2022-10-12 13:43:55 +0530 |
| commit | a3d3a14c09cf212c7d402670247c4d518b99d8b7 (patch) | |
| tree | 5dad10bdebb5d4bc7fbdfc7dc8da9c910e7c3d51 /ospfd/ospf_dump.c | |
| parent | 70cd87ca02125616e9f61f97ab504248c935bd83 (diff) | |
ospfd: rSPF calc and messaging for optimal route reflection
Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
Diffstat (limited to 'ospfd/ospf_dump.c')
| -rw-r--r-- | ospfd/ospf_dump.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 9f6adf3226..eb9991ad8b 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -63,6 +63,7 @@ unsigned long conf_debug_ospf_ldp_sync; unsigned long conf_debug_ospf_gr; unsigned long conf_debug_ospf_bfd; unsigned long conf_debug_ospf_client_api; +unsigned long conf_debug_ospf_orr; /* Enable debug option variables -- valid only session. */ unsigned long term_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; @@ -81,6 +82,7 @@ unsigned long term_debug_ospf_ldp_sync; unsigned long term_debug_ospf_gr; unsigned long term_debug_ospf_bfd; unsigned long term_debug_ospf_client_api; +unsigned long term_debug_ospf_orr; const char *ospf_redist_string(unsigned int route_type) { @@ -1601,6 +1603,25 @@ DEFPY (debug_ospf_client_api, return CMD_SUCCESS; } +DEFPY (debug_ospf_orr, + debug_ospf_orr_cmd, + "[no$no] debug ospf orr", + NO_STR + DEBUG_STR + OSPF_STR + "OSPF ORR information\n") +{ + if (vty->node == CONFIG_NODE) + CONF_DEBUG_ON(orr, ORR); + + if (!no) + TERM_DEBUG_ON(orr, ORR); + else + TERM_DEBUG_OFF(orr, ORR); + + return CMD_SUCCESS; +} + DEFUN (no_debug_ospf, no_debug_ospf_cmd, "no debug ospf", @@ -1643,6 +1664,8 @@ DEFUN (no_debug_ospf, for (i = 0; i < 5; i++) DEBUG_PACKET_OFF(i, flag); + + DEBUG_OFF(orr, ORR); } for (i = 0; i < 5; i++) @@ -1673,6 +1696,7 @@ DEFUN (no_debug_ospf, TERM_DEBUG_OFF(ti_lfa, TI_LFA); TERM_DEBUG_OFF(bfd, BFD_LIB); TERM_DEBUG_OFF(client_api, CLIENT_API); + TERM_DEBUG_OFF(orr, ORR); return CMD_SUCCESS; } @@ -1802,6 +1826,12 @@ static int show_debugging_ospf_common(struct vty *vty) if (IS_DEBUG_OSPF(client_api, CLIENT_API) == OSPF_DEBUG_CLIENT_API) vty_out(vty, " OSPF client-api debugging is on\n"); + /* Show debug status for ORR. */ + if (IS_DEBUG_OSPF(orr, ORR) == OSPF_DEBUG_ORR) + vty_out(vty, " OSPF ORR debugging is on\n"); + + vty_out(vty, "\n"); + return CMD_SUCCESS; } @@ -2014,6 +2044,12 @@ static int config_write_debug(struct vty *vty) write = 1; } + /* debug ospf orr */ + if (IS_CONF_DEBUG_OSPF(orr, ORR) == OSPF_DEBUG_ORR) { + vty_out(vty, "debug ospf%s orr\n", str); + write = 1; + } + return write; } @@ -2035,6 +2071,7 @@ void ospf_debug_init(void) install_element(ENABLE_NODE, &debug_ospf_default_info_cmd); install_element(ENABLE_NODE, &debug_ospf_ldp_sync_cmd); install_element(ENABLE_NODE, &debug_ospf_client_api_cmd); + install_element(ENABLE_NODE, &debug_ospf_orr_cmd); install_element(ENABLE_NODE, &no_debug_ospf_ism_cmd); install_element(ENABLE_NODE, &no_debug_ospf_nsm_cmd); install_element(ENABLE_NODE, &no_debug_ospf_lsa_cmd); @@ -2074,6 +2111,7 @@ void ospf_debug_init(void) install_element(CONFIG_NODE, &debug_ospf_default_info_cmd); install_element(CONFIG_NODE, &debug_ospf_ldp_sync_cmd); install_element(CONFIG_NODE, &debug_ospf_client_api_cmd); + install_element(CONFIG_NODE, &debug_ospf_orr_cmd); install_element(CONFIG_NODE, &no_debug_ospf_nsm_cmd); install_element(CONFIG_NODE, &no_debug_ospf_lsa_cmd); install_element(CONFIG_NODE, &no_debug_ospf_zebra_cmd); |
