diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-05-13 21:43:13 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-13 21:43:13 +0300 |
| commit | d611c3240863f79029ab48d492659a67f82465d9 (patch) | |
| tree | 8171a65c511849b941fbf492514cb5c89918b4e4 /accel-pppd/ctrl/pppoe/cli.c | |
| parent | 5b78328068085a8dc530978fd0b51f5c187a6aff (diff) | |
| parent | e5fe0eaa1fc6b1109db784e818e360159d8dd2ac (diff) | |
| download | accel-ppp-d611c3240863f79029ab48d492659a67f82465d9.tar.gz accel-ppp-d611c3240863f79029ab48d492659a67f82465d9.zip | |
Merge pull request #308 from nuclearcat/stats-rework
stats: improve how we handle statistics in the code
Diffstat (limited to 'accel-pppd/ctrl/pppoe/cli.c')
| -rw-r--r-- | accel-pppd/ctrl/pppoe/cli.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/accel-pppd/ctrl/pppoe/cli.c b/accel-pppd/ctrl/pppoe/cli.c index d8399543..453c0cf3 100644 --- a/accel-pppd/ctrl/pppoe/cli.c +++ b/accel-pppd/ctrl/pppoe/cli.c @@ -88,16 +88,20 @@ help: static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) { + struct pppoe_stat_t stat; + + pppoe_stat_get(&stat); + cli_send(client, "pppoe:\r\n"); - cli_sendv(client, " starting: %u\r\n", stat_starting); - cli_sendv(client, " active: %u\r\n", stat_active); - cli_sendv(client, " delayed PADO: %u\r\n", stat_delayed_pado); - cli_sendv(client, " recv PADI: %lu\r\n", stat_PADI_recv); - cli_sendv(client, " drop PADI: %lu\r\n", stat_PADI_drop); - cli_sendv(client, " sent PADO: %lu\r\n", stat_PADO_sent); - cli_sendv(client, " recv PADR(dup): %lu(%lu)\r\n", stat_PADR_recv, stat_PADR_dup_recv); - cli_sendv(client, " sent PADS: %lu\r\n", stat_PADS_sent); - cli_sendv(client, " filtered: %lu\r\n", stat_filtered); + cli_sendv(client, " starting: %u\r\n", stat.starting); + cli_sendv(client, " active: %u\r\n", stat.active); + cli_sendv(client, " delayed PADO: %u\r\n", stat.delayed_PADO); + cli_sendv(client, " recv PADI: %lu\r\n", stat.PADI_recv); + cli_sendv(client, " drop PADI: %lu\r\n", stat.PADI_drop); + cli_sendv(client, " sent PADO: %lu\r\n", stat.PADO_sent); + cli_sendv(client, " recv PADR(dup): %lu(%lu)\r\n", stat.PADR_recv, stat.PADR_dup_recv); + cli_sendv(client, " sent PADS: %lu\r\n", stat.PADS_sent); + cli_sendv(client, " filtered: %lu\r\n", stat.filtered); return CLI_CMD_OK; } |
