+ fprintf(f," <th style=\"text-align: right\">%Lu</th>\n", total_proxy);\r
+ }\r
+*/\r
+ fprintf(f, "<th style=\"text-align: right\">%Lu</th><th style=\"text-align: right\">%d</th>",\r
+ total_direct, total_pktdown/i);\r
+ fprintf(f, "<th colspan=\"6\"><span style=\"color:red\">LIMIT %dx</span> \\r
+<span style=\"color:brown\">LOW-PRIO %dx</span></th></tr>\n</thead></table>\n",\r
+ limit_count, prio_count);\r
+\r
+ if(ip6prefix)\r
+ { \r
+ for_each(ip, ips)\r
+ { \r
+ if(ip->v6)\r
+ {\r
+ bytes6 += ip->upload + ip->direct;\r
+ pkts6 += ip->pktsdown + ip->pktsup;\r
+ count6++;\r
+ }\r
+ else\r
+ {\r
+ bytes4 += ip->upload + ip->direct;\r
+ pkts4 += ip->pktsdown + ip->pktsup;\r
+ count4++;\r
+ }\r
+ }\r
+\r
+ perc6=(double)(bytes6)/(bytes4+bytes6)*100;\r
+ fputs("<p><table class=\"decorated last\"><caption>IP protocols usage</caption>\n",f);\r
+ fprintf(f, "%s<td>Total %d IPv4 addreses</td><td style=\"text-align: right\">%Lu MB (%.2f %%)</td><td style=\"text-align: right\">%Lu packets (%.2f %%)</td></tr>\n",\r
+ tr_odd_even(), count4, bytes4, (double)(bytes4)/(bytes4+bytes6)*100, pkts4, (float)(100*pkts4)/(pkts4+pkts6));\r
+ fprintf(f, "%s<td>Total %d IPv6 /64 ranges</td><td style=\"text-align: right\">%Lu MB (%.2f %%)</td><td style=\"text-align: right\">%Lu packets (%.2f %%)</td></tr>\n",\r
+ tr_odd_even(), count6, bytes6, perc6, pkts6, (float)(100*pkts6)/(pkts4+pkts6));\r
+ fputs("</table></p>\n", f);\r