diff options
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 44 | ||||
-rw-r--r-- | vtysh/vtysh_config.c | 5 |
2 files changed, 33 insertions, 16 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 9939a7fae..34d66735d 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -752,6 +752,7 @@ int vtysh_config_from_file(struct vty *vty, FILE *fp) lineno, cmd_stat, vtysh_client[i].name, vty->buf); + retcode = cmd_stat; break; } } @@ -1914,6 +1915,28 @@ static int show_per_daemon(const char *line, const char *headline) return ret; } +DEFUN (vtysh_show_debugging, + vtysh_show_debugging_cmd, + "show debugging", + SHOW_STR + DEBUG_STR) +{ + return show_per_daemon("do show debugging\n", + "Debugging Information for %s:\n"); +} + +DEFUN (vtysh_show_debugging_hashtable, + vtysh_show_debugging_hashtable_cmd, + "show debugging hashtable [statistics]", + SHOW_STR + DEBUG_STR + "Statistics about hash tables\n" + "Statistics about hash tables\n") +{ + return show_per_daemon("do show debugging hashtable\n", + "Hashtable statistics for %s:\n"); +} + /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, @@ -1921,7 +1944,8 @@ DEFUN (vtysh_show_memory, SHOW_STR "Memory statistics\n") { - return show_per_daemon("show memory\n", "Memory statistics for %s:\n"); + return show_per_daemon("show memory\n", + "Memory statistics for %s:\n"); } DEFUN (vtysh_show_modules, @@ -1941,20 +1965,8 @@ DEFUN (vtysh_show_logging, SHOW_STR "Show current logging configuration\n") { - unsigned int i; - int ret = CMD_SUCCESS; - char line[] = "do show logging\n"; - - for (i = 0; i < array_size(vtysh_client); i++) - if (vtysh_client[i].fd >= 0) { - fprintf(stdout, "Logging configuration for %s:\n", - vtysh_client[i].name); - ret = vtysh_client_execute(&vtysh_client[i], line, - stdout); - fprintf(stdout, "\n"); - } - - return ret; + return show_per_daemon("do show logging\n", + "Logging configuration for %s:\n"); } DEFUNSH(VTYSH_ALL, vtysh_log_stdout, vtysh_log_stdout_cmd, "log stdout", @@ -3220,6 +3232,8 @@ void vtysh_init_vty(void) install_element(ENABLE_NODE, &vtysh_start_zsh_cmd); #endif + install_element(VIEW_NODE, &vtysh_show_debugging_cmd); + install_element(VIEW_NODE, &vtysh_show_debugging_hashtable_cmd); install_element(VIEW_NODE, &vtysh_show_memory_cmd); install_element(VIEW_NODE, &vtysh_show_modules_cmd); diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 1ce065fcc..d7e79d6b2 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -245,7 +245,10 @@ void vtysh_config_parse_line(void *arg, const char *line) == 0 || strncmp(line, "ip extcommunity-list", strlen("ip extcommunity-list")) - == 0) + == 0 + || strncmp(line, "ip large-community-list", + strlen("ip large-community-list")) + == 0) config = config_get(COMMUNITY_LIST_NODE, line); else if (strncmp(line, "ip route", strlen("ip route")) == 0) config = config_get(IP_NODE, line); |