summaryrefslogtreecommitdiff
path: root/accel-pppd/cli
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2021-05-25 17:32:28 +0500
committerVladislav Grishenko <themiron@mail.ru>2021-05-25 17:32:28 +0500
commit35a4901c4f8a2bb3fadbaf1fbe3636c01a22e9d7 (patch)
treeda234ac61aa241916961ef040f9a308116a5f822 /accel-pppd/cli
parentb621a9a3a5a554be1393d5ad33e23c5cea6385b9 (diff)
parent2cd9ffe9086415fcc934001048b40f4a005aadcc (diff)
downloadaccel-ppp-35a4901c4f8a2bb3fadbaf1fbe3636c01a22e9d7.tar.gz
accel-ppp-35a4901c4f8a2bb3fadbaf1fbe3636c01a22e9d7.zip
Merge branch 'master' of github.com:accel-ppp/accel-ppp
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r--accel-pppd/cli/std_cmd.c12
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");