ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch b/external/subpack/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch
new file mode 100644
index 0000000..cfaba70
--- /dev/null
+++ b/external/subpack/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch
@@ -0,0 +1,24 @@
+--- a/configure.in
++++ b/configure.in
+@@ -24,11 +24,6 @@ if test -n "$x_libraries" && test "x$x_l
+ 	LDFLAGS="$LDFLAGS -L$x_libraries"
+ fi
+ 
+-# May be equired for BSD
+-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-
+-CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+-
+ #Check for Darwin sw directory
+ AC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib")
+ AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include")
+@@ -55,8 +50,7 @@ AC_CHECK_LIB(pcap, pcap_open_live, ,
+ 	[AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])])
+ 
+ # Optional Library
+-AC_CHECK_FILE(/usr/lib, LDFLAGS="$LDFLAGS -L/usr/lib")
+-AC_CHECK_FILE(/usr/include/pgsql, CPPFLAGS="$CPPFLAGS -I/usr/include/pgsql")
++AC_CHECK_FILE(/usr/local/pgsql/include, CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include")
+ AC_CHECK_LIB(pq, PQconnectdb,
+ 	[AC_CHECK_LIB(pq,PQexecParams, ,AC_MSG_WARN([libpq exists but is too old... bandwidthd requires support for PQexecParams]))])
+ AC_CHECK_LIB(sqlite3, sqlite3_open, ,AC_MSG_WARN([sqlite3 is recommended for storage of data but cannot be found]))
diff --git a/external/subpack/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch b/external/subpack/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch
new file mode 100644
index 0000000..d0e6144
--- /dev/null
+++ b/external/subpack/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch
@@ -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))
diff --git a/external/subpack/utils/bandwidthd/patches/030-gcc10.patch b/external/subpack/utils/bandwidthd/patches/030-gcc10.patch
new file mode 100644
index 0000000..04d3ce0
--- /dev/null
+++ b/external/subpack/utils/bandwidthd/patches/030-gcc10.patch
@@ -0,0 +1,20 @@
+--- a/bandwidthd.h
++++ b/bandwidthd.h
+@@ -120,7 +120,7 @@ struct config
+ 	char *sensor_id;
+ 	};
+ 
+-struct SubnetData
++extern struct SubnetData
+     {
+     uint32_t ip;
+     uint32_t mask;
+@@ -139,7 +139,7 @@ struct Statistics
+ 	unsigned long long p2p;
+     };
+ 
+-struct IPData
++extern struct IPData
+     {
+     time_t timestamp;
+     uint32_t ip;	// Host byte order