diff options
-rw-r--r-- | accel-pppd/cli/std_cmd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/accel-pppd/cli/std_cmd.c b/accel-pppd/cli/std_cmd.c index e752918c..e22ea768 100644 --- a/accel-pppd/cli/std_cmd.c +++ b/accel-pppd/cli/std_cmd.c @@ -84,6 +84,17 @@ static void show_stat_help(char * const *fields, int fields_cnt, void *client) } //============================= +static int show_version_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) +{ + cli_sendv(client, "%s\r\n", ACCEL_PPP_VERSION); +} + +static void show_version_help(char * const *fields, int fields_cnt, void *client) +{ + cli_send(client, "show version - shows version of running accel-pppd\r\n"); +} +//============================= + static int exit_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) { return CLI_CMD_EXIT; @@ -381,6 +392,7 @@ static void restart_help(char * const *fields, int fields_cnt, void *client) static void init(void) { cli_register_simple_cmd2(show_stat_exec, show_stat_help, 2, "show", "stat"); + cli_register_simple_cmd2(show_version_exec, show_version_help, 2, "show", "version"); cli_register_simple_cmd2(terminate_exec, terminate_help, 1, "terminate"); cli_register_simple_cmd2(reload_exec, reload_help, 1, "reload"); cli_register_simple_cmd2(restart_exec, restart_help, 1, "restart"); |