\r
char *kwd="via-prometheus"; /* /etc/hosts comment, eg. #qos-64-128 */\r
\r
-const idxtable_treshold1=24; /* this is no longer configurable */\r
-const idxtable_treshold2=12; /* this is no longer configurable */\r
-const idxtable_bitmask1=3; /* this is no longer configurable */\r
-const idxtable_bitmask2=3; /* this is no longer configurable */\r
+const int idxtable_treshold1=24; /* this is no longer configurable */\r
+const int idxtable_treshold2=12; /* this is no longer configurable */\r
+const int idxtable_bitmask1=3; /* this is no longer configurable */\r
+const int idxtable_bitmask2=3; /* this is no longer configurable */\r
\r
\r
/* not yet implemented:\r
if(ip_count>idxtable_treshold1 && !just_flush)\r
{\r
int idxcount=0, bitmask=32-idxtable_bitmask1; /* default net mask: 255.255.255.240 */\r
- char *subnet, *ptr, *buf;\r
+ char *subnet, *buf;\r
/*-----------------------------------------------------------------*/\r
printf("Detected %d addresses - indexing iptables rules to improve performance...\n",ip_count);\r
/*-----------------------------------------------------------------*/\r
#ifdef DEBUG\r
printf("Total groups: %d Total bandwidth requested: %d k\nAGGREGATION: 1/%d\n",count,i,i/line);\r
#endif\r
- fprintf(f,"<tr><th colspan=\"2\" align=\"left\">Line %d k</td>",line);\r
+ fprintf(f,"<tr><th colspan=\"2\" align=\"left\">Line %Ld k</td>",line);\r
fprintf(f,"<th align=\"right\">%d</td><th align=\"right\">%d k</td>",total,i);\r
\r
every(keyword,keywords)\r
fputs("<a name=\"erp\"></a><p><table border><tr><th colspan=\"4\">Enterprise Research and Planning (ERP)</th></tr>\n",f);\r
fputs("<tr><td colspan=\"2\">Active Classes</td><td colspan=\"2\">Data transfers</td></tr>\n",f);\r
find (sum,sums,sum->l>=total/4)\r
- fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%d %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
+ fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%Ld %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
find (sum,sums,sum->i==10)\r
- fprintf(f,"<tr><td>Top 10</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%d %%</td></tr>\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
+ fprintf(f,"<tr><td>Top 10</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%Ld %%</td></tr>\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
find (sum,sums,sum->l>=total/2)\r
- fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%d %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
+ fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%Ld %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
find (sum,sums,sum->i>=(active_classes+3)/4)\r
- fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%d %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
+ fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%Ld %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
find (sum,sums,sum->i>=(active_classes+1)/2)\r
- fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%d %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
+ fprintf(f,"<tr><td>Top %d</td><td align=\"right\">%d %%</td><td align=\"right\">%Lu M</td><td align=\"right\">%Ld %%</td></tr>\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total);\r
fprintf(f,"<tr><th align=\"left\">All %d</th><th align=\"right\">100 %%</th><th align=\"right\">%Lu M</th><th align=\"right\">100 %%</th></tr>\n",active_classes,total);\r
fputs("</table>\n",f);\r
}\r
#Path to external utilities required to run iGW Prometheus:
#--------------------------------------------------------------------------
tc /sbin/tc
-iptables /sbin/iptables
+iptables /usr/sbin/iptables
+iptables-restore /usr/sbin/iptables-restore
+#==========================================================================
+#Filename of iptables mangle table for iptables-restore
+#--------------------------------------------------------------------------
+iptables-file /var/spool/prometheus.iptables
#==========================================================================
#Filename of /etc/hosts - style IP address configuration file
#--------------------------------------------------------------------------
#HTB fine tuning part I - common settings
#--------------------------------------------------------------------------
htb-nesting-limit 3 #0..4: HTB seems to have built-in limit
-htb-burst 32 #kbit
-htb-leaf-discipline sfq perturb 5
+htb-burst 8 #kbit (ip level classes)
+htb-burst-group 32 #kbit (group level classes)
+htb-burst-main 64 #kbit (medium&line level classes - 1:1, 1:2)
+htb-leaf-discipline sfq perturb 5 #maybe "none"
+htb-r2q 1
+#type filtering traffic: mark&filter or classify (without tc filter)
+filter-type classify #or mark
#==========================================================================
#magic-include-upload - is data counter sum of upload and download ?
#magic-priorities - prioty levels are used by magic-relative-prio
via-prometheus-htb-ceil-malus 0 #kbps
adsl-prometheus-htb-default-prio 1
adsl-prometheus-htb-rate-bonus 16
-adsl-prometheus-htb-ceil-malus 0
+adsl-prometheus-htb-ceil-malus 0
+#==========================================================================
+#HTB fine tuning part III - keyword dependent settings
+#--------------------------------------------------------------------------
+#These settings are keyword-derived ! (see "keyword" section)
+# optionally! if not defined, using global leaf-discipline
+# value "none" skip qdisc creation for this keyword
+#--------------------------------------------------------------------------
+#via-prometheus-leaf-leaf-discipline esfq
+#adsl-prometheus-leaf-discipline none
#==========================================================================
#Credit file settings - stores unused credit from previous runs
#--------------------------------------------------------------------------