packages/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch
Jean-Michel Lacroix 5c9665a070 bandwidthd: update to 2.0.1-34, sqlite support and SMTP tracking
Addition of sqlite storage
Tracking of SMTP traffic instead of P2P traffic
Based on NethServer bandwidthd implementation

Signed-off-by: Jean-Michel lacroix <lacroix@lepine-lacroix.info>
2017-01-01 12:44:56 -05:00

20 lines
1.5 KiB
Diff

--- a/graph.c
+++ b/graph.c
@@ -274,7 +274,7 @@ void MakeIndexPages(int NumIps, struct S
// PASS 1: Write out the table
- fprintf(file, "<TR bgcolor=lightblue><TD>Ip and Name<TD align=center>Total<TD align=center>Total Sent<TD align=center>Total Received<TD align=center>FTP<TD align=center>HTTP<TD align=center>P2P<TD align=center>TCP<TD align=center>UDP<TD align=center>ICMP\n");
+ fprintf(file, "<TR bgcolor=lightblue><TD>Ip and Name<TD align=center>Total<TD align=center>Total Sent<TD align=center>Total Received<TD align=center>FTP<TD align=center>HTTP<TD align=center>SMTP<TD align=center>TCP<TD align=center>UDP<TD align=center>ICMP\n");
for (Counter=0; Counter < 21 && Counter < NumIps; Counter++)
PrintTableLine(file, SummaryData[Counter], Counter);
@@ -341,7 +341,7 @@ void MakeIndexPages(int NumIps, struct S
// PASS 1: Write out the table
- fprintf(file, "<TR bgcolor=lightblue><TD>Ip and Name<TD align=center>Total<TD align=center>Total Sent<TD align=center>Total Received<TD align=center>FTP<TD align=center>HTTP<TD align=center>P2P<TD align=center>TCP<TD align=center>UDP<TD align=center>ICMP\n");
+ fprintf(file, "<TR bgcolor=lightblue><TD>Ip and Name<TD align=center>Total<TD align=center>Total Sent<TD align=center>Total Received<TD align=center>FTP<TD align=center>HTTP<TD align=center>SMTP<TD align=center>TCP<TD align=center>UDP<TD align=center>ICMP\n");
for (tCounter=0, Counter=0; Counter < NumIps; Counter++)
{
if (SubnetTable[SubnetCounter].ip == (SummaryData[Counter]->IP & SubnetTable[SubnetCounter].mask))