summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c6
-rw-r--r--lib/command.h6
-rw-r--r--lib/routemap.c6
-rw-r--r--lib/routemap.h2
4 files changed, 20 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index a23afb1e43..7e171cb309 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -48,6 +48,7 @@
#include "lib_errors.h"
#include "northbound_cli.h"
#include "network.h"
+#include "routemap.h"
#include "frrscript.h"
@@ -2446,6 +2447,11 @@ const char *host_config_get(void)
return host.config;
}
+void cmd_show_lib_debugs(struct vty *vty)
+{
+ route_map_show_debug(vty);
+}
+
void install_default(enum node_type node)
{
_install_element(node, &config_exit_cmd);
diff --git a/lib/command.h b/lib/command.h
index 70e52708a7..ca49efd262 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -649,6 +649,12 @@ extern char *cmd_variable_comp2str(vector comps, unsigned short cols);
extern void command_setup_early_logging(const char *dest, const char *level);
+/*
+ * Allow a mechanism for `debug XXX` commands that live
+ * under the lib directory to output their debug status
+ */
+extern void cmd_show_lib_debugs(struct vty *vty);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/routemap.c b/lib/routemap.c
index 3cc010c148..3a92799991 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -3174,6 +3174,12 @@ static struct cmd_node rmap_debug_node = {
.config_write = rmap_config_write_debug,
};
+void route_map_show_debug(struct vty *vty)
+{
+ if (rmap_debug)
+ vty_out(vty, "debug route-map\n");
+}
+
/* Configuration write function. */
static int rmap_config_write_debug(struct vty *vty)
{
diff --git a/lib/routemap.h b/lib/routemap.h
index a365925854..c2e9de6cfb 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -1015,6 +1015,8 @@ extern void route_map_optimization_disabled_show(struct vty *vty,
bool show_defaults);
extern void route_map_cli_init(void);
+extern void route_map_show_debug(struct vty *vty);
+
#ifdef __cplusplus
}
#endif