X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=htmlandlogs.c;h=c6d16120dd6da25646555ddcdd2f7e0a1eb295a4;hp=291871ef36177b0bdb02505d10789195b79dd6df;hb=62b118c2d21d2ee89872ec6d3e253039728abd5d;hpb=3f76726a95b374e0f3b405b6e07f1ed3f565df01 diff --git a/htmlandlogs.c b/htmlandlogs.c index 291871e..c6d1612 100644 --- a/htmlandlogs.c +++ b/htmlandlogs.c @@ -346,9 +346,9 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview) perc6=(double)(bytes6)/(bytes4+bytes6)*100; fputs("

\n",f); - fprintf(f, "%s\n", + fprintf(f, "%s\n", tr_odd_even(), count4, bytes4, (double)(bytes4)/(bytes4+bytes6)*100, pkts4, (float)(100*pkts4)/(pkts4+pkts6)); - fprintf(f, "%s\n", + fprintf(f, "%s\n", tr_odd_even(), count6, bytes6, perc6, pkts6, (float)(100*pkts6)/(pkts4+pkts6)); fputs("
IP protocols usage
Total %d IPv4 (addreses)%Lu MB (%.2f %%)%Lu packets (%.2f %%)
Total %d IPv4 addreses%Lu MB (%.2f %%)%Lu packets (%.2f %%)
Total %d IPv6 (/64 ranges)%Lu MB (%.2f %%)%Lu packets (%.2f %%)
Total %d IPv6 /64 ranges%Lu MB (%.2f %%)%Lu packets (%.2f %%)

\n", f); } @@ -466,7 +466,7 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview) iplog=fopen(str,"a"); if(iplog) { - fprintf(iplog, "%ld\t%d\t%d %%\t%Lu M\t%Ld %%\tACTIVE %d\tTRAFFIC %Lu M\tCLASSES %d\tFUP-LIMIT %d\tLOW-PRIO %d\tIPv6 %Lu\t%.2f %%\t%s", + fprintf(iplog, "%ld\t%d\t%d %%\t%Lu M\t%Ld %%\tACTIVE %d\tTRAFFIC %Lu M\tCLASSES %d\tFUP-LIMIT %d\tLOW-PRIO %d\tIPv6 %Lu M\t%.2f %%\t%s", time(NULL), top20_count, top20_perc1, top20_sum, top20_perc2, active_classes, total_traffic, i, limit_count, prio_count, bytes6, perc6, d); /* d = date*/