- cli_print(cli, "%-30s%lu", "call_processtun", GET_STAT(call_processtun));
- cli_print(cli, "%-30s%lu", "call_processipout", GET_STAT(call_processipout));
- cli_print(cli, "%-30s%lu", "call_processudp", GET_STAT(call_processudp));
- cli_print(cli, "%-30s%lu", "call_processpap", GET_STAT(call_processpap));
- cli_print(cli, "%-30s%lu", "call_processchap", GET_STAT(call_processchap));
- cli_print(cli, "%-30s%lu", "call_processlcp", GET_STAT(call_processlcp));
- cli_print(cli, "%-30s%lu", "call_processipcp", GET_STAT(call_processipcp));
- cli_print(cli, "%-30s%lu", "call_processipin", GET_STAT(call_processipin));
- cli_print(cli, "%-30s%lu", "call_processccp", GET_STAT(call_processccp));
- cli_print(cli, "%-30s%lu", "call_processrad", GET_STAT(call_processrad));
- cli_print(cli, "%-30s%lu", "call_sendarp", GET_STAT(call_sendarp));
- cli_print(cli, "%-30s%lu", "call_sendipcp", GET_STAT(call_sendipcp));
- cli_print(cli, "%-30s%lu", "call_sendchap", GET_STAT(call_sendchap));
- cli_print(cli, "%-30s%lu", "call_sessionbyip", GET_STAT(call_sessionbyip));
- cli_print(cli, "%-30s%lu", "call_sessionbyuser", GET_STAT(call_sessionbyuser));
- cli_print(cli, "%-30s%lu", "call_tunnelsend", GET_STAT(call_tunnelsend));
- cli_print(cli, "%-30s%lu", "call_tunnelkill", GET_STAT(call_tunnelkill));
- cli_print(cli, "%-30s%lu", "call_tunnelshutdown", GET_STAT(call_tunnelshutdown));
- cli_print(cli, "%-30s%lu", "call_sessionkill", GET_STAT(call_sessionkill));
- cli_print(cli, "%-30s%lu", "call_sessionshutdown", GET_STAT(call_sessionshutdown));
- cli_print(cli, "%-30s%lu", "call_sessionsetup", GET_STAT(call_sessionsetup));
- cli_print(cli, "%-30s%lu", "call_assign_ip_address", GET_STAT(call_assign_ip_address));
- cli_print(cli, "%-30s%lu", "call_free_ip_address", GET_STAT(call_free_ip_address));
- cli_print(cli, "%-30s%lu", "call_dump_acct_info", GET_STAT(call_dump_acct_info));
- cli_print(cli, "%-30s%lu", "call_radiussend", GET_STAT(call_radiussend));
- cli_print(cli, "%-30s%lu", "call_radiusretry", GET_STAT(call_radiusretry));
-#endif
+ cli_print(cli, "%-30s%u", "call_processtun", GET_STAT(call_processtun));
+ cli_print(cli, "%-30s%u", "call_processipout", GET_STAT(call_processipout));
+ cli_print(cli, "%-30s%u", "call_processipv6out", GET_STAT(call_processipv6out));
+ cli_print(cli, "%-30s%u", "call_processudp", GET_STAT(call_processudp));
+ cli_print(cli, "%-30s%u", "call_processpap", GET_STAT(call_processpap));
+ cli_print(cli, "%-30s%u", "call_processchap", GET_STAT(call_processchap));
+ cli_print(cli, "%-30s%u", "call_processlcp", GET_STAT(call_processlcp));
+ cli_print(cli, "%-30s%u", "call_processipcp", GET_STAT(call_processipcp));
+ cli_print(cli, "%-30s%u", "call_processipv6cp", GET_STAT(call_processipv6cp));
+ cli_print(cli, "%-30s%u", "call_processipin", GET_STAT(call_processipin));
+ cli_print(cli, "%-30s%u", "call_processipv6in", GET_STAT(call_processipv6in));
+ cli_print(cli, "%-30s%u", "call_processccp", GET_STAT(call_processccp));
+ cli_print(cli, "%-30s%u", "call_processrad", GET_STAT(call_processrad));
+ cli_print(cli, "%-30s%u", "call_sendarp", GET_STAT(call_sendarp));
+ cli_print(cli, "%-30s%u", "call_sendipcp", GET_STAT(call_sendipcp));
+ cli_print(cli, "%-30s%u", "call_sendchap", GET_STAT(call_sendchap));
+ cli_print(cli, "%-30s%u", "call_sessionbyip", GET_STAT(call_sessionbyip));
+ cli_print(cli, "%-30s%u", "call_sessionbyipv6", GET_STAT(call_sessionbyipv6));
+ cli_print(cli, "%-30s%u", "call_sessionbyuser", GET_STAT(call_sessionbyuser));
+ cli_print(cli, "%-30s%u", "call_tunnelsend", GET_STAT(call_tunnelsend));
+ cli_print(cli, "%-30s%u", "call_tunnelkill", GET_STAT(call_tunnelkill));
+ cli_print(cli, "%-30s%u", "call_tunnelshutdown", GET_STAT(call_tunnelshutdown));
+ cli_print(cli, "%-30s%u", "call_sessionkill", GET_STAT(call_sessionkill));
+ cli_print(cli, "%-30s%u", "call_sessionshutdown", GET_STAT(call_sessionshutdown));
+ cli_print(cli, "%-30s%u", "call_sessionsetup", GET_STAT(call_sessionsetup));
+ cli_print(cli, "%-30s%u", "call_assign_ip_address", GET_STAT(call_assign_ip_address));
+ cli_print(cli, "%-30s%u", "call_free_ip_address", GET_STAT(call_free_ip_address));
+ cli_print(cli, "%-30s%u", "call_dump_acct_info", GET_STAT(call_dump_acct_info));
+ cli_print(cli, "%-30s%u", "call_radiussend", GET_STAT(call_radiussend));
+ cli_print(cli, "%-30s%u", "call_radiusretry", GET_STAT(call_radiusretry));
+ cli_print(cli, "%-30s%u", "call_random_data", GET_STAT(call_random_data));
+#endif /* STAT_CALLS */
+
+ {
+ time_t l = GET_STAT(last_reset);
+ char *t = ctime(&l);
+ char *p = strchr(t, '\n');
+ if (p) *p = 0;
+
+ cli_print(cli, "");
+ cli_print(cli, "Last counter reset %s", t);
+ }
+
+ return CLI_OK;
+}
+
+static int cmd_clear_counters(struct cli_def *cli, char *command, char **argv, int argc)
+{
+ if (CLI_HELP_REQUESTED)
+ return CLI_HELP_NO_ARGS;
+
+ memset(_statistics, 0, sizeof(struct Tstats));
+ SET_STAT(last_reset, time(NULL));
+
+ cli_print(cli, "Counters cleared");