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>
This commit is contained in:
Jean-Michel Lacroix
2017-01-01 12:44:56 -05:00
parent a876e13fd6
commit 5c9665a070
26 changed files with 1130 additions and 209 deletions
@@ -0,0 +1,20 @@
--- 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))