- fprintf(w, "\r\n");
-
- fprintf(w, "%-30s%-10s\r\n", "Counter", "Value");
- fprintf(w, "-----------------------------------------\r\n");
- fprintf(w, "%-30s%lu\r\n", "radius_retries", GET_STAT(radius_retries));
- fprintf(w, "%-30s%lu\r\n", "arp_errors", GET_STAT(arp_errors));
- fprintf(w, "%-30s%lu\r\n", "arp_replies", GET_STAT(arp_replies));
- fprintf(w, "%-30s%lu\r\n", "arp_discarded", GET_STAT(arp_discarded));
- fprintf(w, "%-30s%lu\r\n", "arp_sent", GET_STAT(arp_sent));
- fprintf(w, "%-30s%lu\r\n", "arp_recv", GET_STAT(arp_recv));
- fprintf(w, "%-30s%lu\r\n", "packets_snooped", GET_STAT(packets_snooped));
- fprintf(w, "%-30s%lu\r\n", "tunnel_created", GET_STAT(tunnel_created));
- fprintf(w, "%-30s%lu\r\n", "session_created", GET_STAT(session_created));
- fprintf(w, "%-30s%lu\r\n", "tunnel_timeout", GET_STAT(tunnel_timeout));
- fprintf(w, "%-30s%lu\r\n", "session_timeout", GET_STAT(session_timeout));
- fprintf(w, "%-30s%lu\r\n", "radius_timeout", GET_STAT(radius_timeout));
- fprintf(w, "%-30s%lu\r\n", "radius_overflow", GET_STAT(radius_overflow));
- fprintf(w, "%-30s%lu\r\n", "tunnel_overflow", GET_STAT(tunnel_overflow));
- fprintf(w, "%-30s%lu\r\n", "session_overflow", GET_STAT(session_overflow));
- fprintf(w, "%-30s%lu\r\n", "ip_allocated", GET_STAT(ip_allocated));
- fprintf(w, "%-30s%lu\r\n", "ip_freed", GET_STAT(ip_freed));
-
-#ifdef STAT_CALLS
- fprintf(w, "\n%-30s%-10s\r\n", "Counter", "Value");
- fprintf(w, "-----------------------------------------\r\n");
- fprintf(w, "%-30s%lu\r\n", "call_processtap", GET_STAT(call_processtap));
- fprintf(w, "%-30s%lu\r\n", "call_processarp", GET_STAT(call_processarp));
- fprintf(w, "%-30s%lu\r\n", "call_processipout", GET_STAT(call_processipout));
- fprintf(w, "%-30s%lu\r\n", "call_processudp", GET_STAT(call_processudp));
- fprintf(w, "%-30s%lu\r\n", "call_processpap", GET_STAT(call_processpap));
- fprintf(w, "%-30s%lu\r\n", "call_processchap", GET_STAT(call_processchap));
- fprintf(w, "%-30s%lu\r\n", "call_processlcp", GET_STAT(call_processlcp));
- fprintf(w, "%-30s%lu\r\n", "call_processipcp", GET_STAT(call_processipcp));
- fprintf(w, "%-30s%lu\r\n", "call_processipin", GET_STAT(call_processipin));
- fprintf(w, "%-30s%lu\r\n", "call_processccp", GET_STAT(call_processccp));
- fprintf(w, "%-30s%lu\r\n", "call_processrad", GET_STAT(call_processrad));
- fprintf(w, "%-30s%lu\r\n", "call_sendarp", GET_STAT(call_sendarp));
- fprintf(w, "%-30s%lu\r\n", "call_sendipcp", GET_STAT(call_sendipcp));
- fprintf(w, "%-30s%lu\r\n", "call_sendchap", GET_STAT(call_sendchap));
- fprintf(w, "%-30s%lu\r\n", "call_sessionbyip", GET_STAT(call_sessionbyip));
- fprintf(w, "%-30s%lu\r\n", "call_sessionbyuser", GET_STAT(call_sessionbyuser));
- fprintf(w, "%-30s%lu\r\n", "call_tunnelsend", GET_STAT(call_tunnelsend));
- fprintf(w, "%-30s%lu\r\n", "call_tunnelkill", GET_STAT(call_tunnelkill));
- fprintf(w, "%-30s%lu\r\n", "call_tunnelshutdown", GET_STAT(call_tunnelshutdown));
- fprintf(w, "%-30s%lu\r\n", "call_sessionkill", GET_STAT(call_sessionkill));
- fprintf(w, "%-30s%lu\r\n", "call_sessionshutdown", GET_STAT(call_sessionshutdown));
- fprintf(w, "%-30s%lu\r\n", "call_sessionsetup", GET_STAT(call_sessionsetup));
- fprintf(w, "%-30s%lu\r\n", "call_assign_ip_address",GET_STAT(call_assign_ip_address));
- fprintf(w, "%-30s%lu\r\n", "call_free_ip_address", GET_STAT(call_free_ip_address));
- fprintf(w, "%-30s%lu\r\n", "call_dump_acct_info", GET_STAT(call_dump_acct_info));
- fprintf(w, "%-30s%lu\r\n", "call_radiussend", GET_STAT(call_radiussend));
- fprintf(w, "%-30s%lu\r\n", "call_radiusretry", GET_STAT(call_radiusretry));
+ cli_print(cli, "");
+
+ cli_print(cli, "%-30s%-10s", "Counter", "Value");
+ cli_print(cli, "-----------------------------------------");
+ cli_print(cli, "%-30s%lu", "radius_retries", GET_STAT(radius_retries));
+ cli_print(cli, "%-30s%lu", "arp_errors", GET_STAT(arp_errors));
+ cli_print(cli, "%-30s%lu", "arp_replies", GET_STAT(arp_replies));
+ cli_print(cli, "%-30s%lu", "arp_discarded", GET_STAT(arp_discarded));
+ cli_print(cli, "%-30s%lu", "arp_sent", GET_STAT(arp_sent));
+ cli_print(cli, "%-30s%lu", "arp_recv", GET_STAT(arp_recv));
+ cli_print(cli, "%-30s%lu", "packets_snooped", GET_STAT(packets_snooped));
+ cli_print(cli, "%-30s%lu", "tunnel_created", GET_STAT(tunnel_created));
+ cli_print(cli, "%-30s%lu", "session_created", GET_STAT(session_created));
+ cli_print(cli, "%-30s%lu", "tunnel_timeout", GET_STAT(tunnel_timeout));
+ cli_print(cli, "%-30s%lu", "session_timeout", GET_STAT(session_timeout));
+ cli_print(cli, "%-30s%lu", "radius_timeout", GET_STAT(radius_timeout));
+ cli_print(cli, "%-30s%lu", "radius_overflow", GET_STAT(radius_overflow));
+ cli_print(cli, "%-30s%lu", "tunnel_overflow", GET_STAT(tunnel_overflow));
+ cli_print(cli, "%-30s%lu", "session_overflow", GET_STAT(session_overflow));
+ cli_print(cli, "%-30s%lu", "ip_allocated", GET_STAT(ip_allocated));
+ cli_print(cli, "%-30s%lu", "ip_freed", GET_STAT(ip_freed));
+ cli_print(cli, "%-30s%lu", "cluster_forwarded", GET_STAT(c_forwarded));
+ cli_print(cli, "%-30s%lu", "recv_forward", GET_STAT(recv_forward));
+
+
+#ifdef STATISTICS
+ cli_print(cli, "\n%-30s%-10s", "Counter", "Value");
+ cli_print(cli, "-----------------------------------------");
+ cli_print(cli, "%-30s%lu", "call_processtap", GET_STAT(call_processtap));
+ cli_print(cli, "%-30s%lu", "call_processarp", GET_STAT(call_processarp));
+ 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));