diff options
author | Kozlov Dmitry <dima@server> | 2010-11-11 14:35:47 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-11-11 14:35:47 +0300 |
commit | 15339d1df496dc3f9225157e97b07f96fa9bdf0b (patch) | |
tree | a430e16d9cada376e50bfcadd810aca10e7da3a6 /accel-pptpd/ctrl/pppoe/pppoe.c | |
parent | dda81cb1d1ba0229aa4c9a90a6f2b2012a4e9326 (diff) | |
download | accel-ppp-15339d1df496dc3f9225157e97b07f96fa9bdf0b.tar.gz accel-ppp-15339d1df496dc3f9225157e97b07f96fa9bdf0b.zip |
cli: simplified cli api
Diffstat (limited to 'accel-pptpd/ctrl/pppoe/pppoe.c')
-rw-r--r-- | accel-pptpd/ctrl/pppoe/pppoe.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c index 73752920..f90d3704 100644 --- a/accel-pptpd/ctrl/pppoe/pppoe.c +++ b/accel-pptpd/ctrl/pppoe/pppoe.c @@ -943,31 +943,6 @@ out_err: _free(serv); } -static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) -{ - char buf[128]; - - if (cli_send(client, "pppoe:\r\n")) - return CLI_CMD_FAILED; - - sprintf(buf, " active: %u\r\n", stat_active); - if (cli_send(client, buf)) - return CLI_CMD_FAILED; - - sprintf(buf, " delayed PADO: %u\r\n", stat_delayed_pado); - if (cli_send(client, buf)) - return CLI_CMD_FAILED; - - return CLI_CMD_OK; -} - -static const char *show_stat_hdr[] = {"show","stat"}; -static struct cli_simple_cmd_t show_stat_cmd = { - .hdr_len = 2, - .hdr = show_stat_hdr, - .exec = show_stat_exec, -}; - static int init_secret(void) { int fd; @@ -1024,7 +999,5 @@ static void __init pppoe_init(void) conf_pado_delay = atoi(opt->val); } } - - cli_register_simple_cmd(&show_stat_cmd); } |