From 96cb277eb2350774924ab8776fd66068b89cf6af Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 21 Sep 2022 16:49:18 +0200 Subject: [PATCH] pathd: display path ted debugging status On 'show debugging' call, display the status about ted debugging. Signed-off-by: Philippe Guibert --- pathd/path_cli.c | 3 +++ pathd/path_ted.c | 6 ++++++ pathd/path_ted.h | 1 + 3 files changed, 10 insertions(+) diff --git a/pathd/path_cli.c b/pathd/path_cli.c index a6540cc84a..e5bbd9430b 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -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; } diff --git a/pathd/path_ted.c b/pathd/path_ted.c index 68748af53e..5fc8a1f032 100644 --- a/pathd/path_ted.c +++ b/pathd/path_ted.c @@ -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); diff --git a/pathd/path_ted.h b/pathd/path_ted.h index c6897b1520..5a0c8eecd3 100644 --- a/pathd/path_ted.h +++ b/pathd/path_ted.h @@ -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 */ -- 2.39.5