fixed some compilation warnings
authorludvik <ludvik@251d49ef-1d17-4917-a970-b30cf55b089b>
Fri, 28 Dec 2007 09:09:07 +0000 (09:09 +0000)
committerludvik <ludvik@251d49ef-1d17-4917-a970-b30cf55b089b>
Fri, 28 Dec 2007 09:09:07 +0000 (09:09 +0000)
update configuration example

git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@24 251d49ef-1d17-4917-a970-b30cf55b089b

prometheus.c
prometheus.conf.SAMPLE

index 19f25ef37577a75fcc7f807d86bb2a9a5aeafa23..a63c5a0e2b2b27d288aa84d1804b627ff70632dc 100644 (file)
@@ -109,10 +109,10 @@ FILE *log_file=NULL;
 \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
@@ -877,7 +877,7 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version);
   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
@@ -1150,7 +1150,7 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version);
 #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
@@ -1259,15 +1259,15 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version);
    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
index a2d95946726b1d0583bb2b1a30e7f48b72ec5bcd..01925f7094db927a5b4fb8ab0157de967f573ddf 100644 (file)
 #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
 #--------------------------------------------------------------------------
@@ -68,8 +73,13 @@ adsl-prometheus-asymetry-treshold    0
 #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
@@ -108,7 +118,16 @@ via-prometheus-htb-rate-bonus              0       #kbps
 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
 #--------------------------------------------------------------------------
This page took 0.154122 seconds and 4 git commands to generate.