pathd: display path ted debugging status

On 'show debugging' call, display the status about
ted debugging.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2022-09-21 16:49:18 +02:00
parent 2c7c09d94c
commit 96cb277eb2
3 changed files with 10 additions and 0 deletions

View File

@ -1091,8 +1091,11 @@ DEFPY_NOSH(show_debugging_pathd, show_debugging_pathd_cmd,
"pathd module debugging\n")
{
vty_out(vty, "Path debugging status:\n");
cmd_show_lib_debugs(vty);
/* nothing to do here */
path_ted_show_debugging(vty);
return CMD_SUCCESS;
}

View File

@ -488,6 +488,12 @@ int path_ted_cli_debug_config_write(struct vty *vty)
return 0;
}
void path_ted_show_debugging(struct vty *vty)
{
if (DEBUG_FLAGS_CHECK(&ted_state_g.dbg, PATH_TED_DEBUG_BASIC))
vty_out(vty, " Path TED debugging is on\n");
}
int path_ted_cli_debug_set_all(uint32_t flags, bool set)
{
DEBUG_FLAGS_SET(&ted_state_g.dbg, flags, set);

View File

@ -101,6 +101,7 @@ int path_ted_segment_list_refresh(void);
/* TED configuration functions */
uint32_t path_ted_config_write(struct vty *vty);
void path_ted_show_debugging(struct vty *vty);
/* TED util functions */
/* clang-format off */