- cli_print(cli, "%-10s %-8s %-10s %-8s", "Ethernet", "Bytes", "Packets", "Errors");
- cli_print(cli, "%-10s %8lu %8lu %8lu", "RX",
- GET_STAT(tap_rx_bytes),
- GET_STAT(tap_rx_packets),
- GET_STAT(tap_rx_errors));
- cli_print(cli, "%-10s %8lu %8lu %8lu", "TX",
- GET_STAT(tap_tx_bytes),
- GET_STAT(tap_tx_packets),
- GET_STAT(tap_tx_errors));
- cli_print(cli, "");
-
- cli_print(cli, "%-10s %-8s %-10s %-8s %-8s", "Tunnel", "Bytes", "Packets", "Errors", "Retries");
- cli_print(cli, "%-10s %8lu %8lu %8lu %8lu", "RX",
- GET_STAT(tunnel_rx_bytes),
- GET_STAT(tunnel_rx_packets),
- GET_STAT(tunnel_rx_errors),
- 0L);
- cli_print(cli, "%-10s %8lu %8lu %8lu %8lu", "TX",
- GET_STAT(tunnel_tx_bytes),
- GET_STAT(tunnel_tx_packets),
- GET_STAT(tunnel_tx_errors),
- GET_STAT(tunnel_retries));
- 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 STAT_CALLS
- 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));
+ if (CLI_HELP_REQUESTED)
+ return CLI_HELP_NO_ARGS;
+
+ cli_print(cli, "%-10s %-8s %-10s %-8s", "Ethernet", "Bytes", "Packets", "Errors");
+ cli_print(cli, "%-10s %8lu %8lu %8lu", "RX",
+ GET_STAT(tun_rx_bytes),
+ GET_STAT(tun_rx_packets),
+ GET_STAT(tun_rx_errors));
+ cli_print(cli, "%-10s %8lu %8lu %8lu", "TX",
+ GET_STAT(tun_tx_bytes),
+ GET_STAT(tun_tx_packets),
+ GET_STAT(tun_tx_errors));
+ cli_print(cli, "");
+
+ cli_print(cli, "%-10s %-8s %-10s %-8s %-8s", "Tunnel", "Bytes", "Packets", "Errors", "Retries");
+ cli_print(cli, "%-10s %8lu %8lu %8lu %8lu", "RX",
+ GET_STAT(tunnel_rx_bytes),
+ GET_STAT(tunnel_rx_packets),
+ GET_STAT(tunnel_rx_errors),
+ 0L);
+ cli_print(cli, "%-10s %8lu %8lu %8lu %8lu", "TX",
+ GET_STAT(tunnel_tx_bytes),
+ GET_STAT(tunnel_tx_packets),
+ GET_STAT(tunnel_tx_errors),
+ GET_STAT(tunnel_retries));
+ 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_sent", GET_STAT(arp_sent));
+ 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_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));