From e0161edba41f7f5cf630f53ebc299f50aaa29d92 Mon Sep 17 00:00:00 2001 From: ludvik Date: Fri, 28 Dec 2007 09:09:07 +0000 Subject: [PATCH] fixed some compilation warnings update configuration example git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@24 251d49ef-1d17-4917-a970-b30cf55b089b --- prometheus.c | 22 +++++++++++----------- prometheus.conf.SAMPLE | 27 +++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/prometheus.c b/prometheus.c index 19f25ef..a63c5a0 100644 --- a/prometheus.c +++ b/prometheus.c @@ -109,10 +109,10 @@ FILE *log_file=NULL; char *kwd="via-prometheus"; /* /etc/hosts comment, eg. #qos-64-128 */ -const idxtable_treshold1=24; /* this is no longer configurable */ -const idxtable_treshold2=12; /* this is no longer configurable */ -const idxtable_bitmask1=3; /* this is no longer configurable */ -const idxtable_bitmask2=3; /* this is no longer configurable */ +const int idxtable_treshold1=24; /* this is no longer configurable */ +const int idxtable_treshold2=12; /* this is no longer configurable */ +const int idxtable_bitmask1=3; /* this is no longer configurable */ +const int idxtable_bitmask2=3; /* this is no longer configurable */ /* not yet implemented: @@ -877,7 +877,7 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version); if(ip_count>idxtable_treshold1 && !just_flush) { int idxcount=0, bitmask=32-idxtable_bitmask1; /* default net mask: 255.255.255.240 */ - char *subnet, *ptr, *buf; + char *subnet, *buf; /*-----------------------------------------------------------------*/ printf("Detected %d addresses - indexing iptables rules to improve performance...\n",ip_count); /*-----------------------------------------------------------------*/ @@ -1150,7 +1150,7 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version); #ifdef DEBUG printf("Total groups: %d Total bandwidth requested: %d k\nAGGREGATION: 1/%d\n",count,i,i/line); #endif - fprintf(f,"Line %d k",line); + fprintf(f,"Line %Ld k",line); fprintf(f,"%d%d k",total,i); every(keyword,keywords) @@ -1259,15 +1259,15 @@ Credits: CZFree.Net, Martin Devera, Netdave, Aquarius\n\n",version); fputs("

\n",f); fputs("\n",f); find (sum,sums,sum->l>=total/4) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); find (sum,sums,sum->i==10) - fprintf(f,"\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + fprintf(f,"\n",(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); find (sum,sums,sum->l>=total/2) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); find (sum,sums,sum->i>=(active_classes+3)/4) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); find (sum,sums,sum->i>=(active_classes+1)/2) - fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); + fprintf(f,"\n",sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total); fprintf(f,"\n",active_classes,total); fputs("
Enterprise Research and Planning (ERP)
Active ClassesData transfers
Top %d%d %%%Lu M%d %%
Top %d%d %%%Lu M%Ld %%
Top 10%d %%%Lu M%d %%
Top 10%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%d %%
Top %d%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%d %%
Top %d%d %%%Lu M%Ld %%
Top %d%d %%%Lu M%d %%
Top %d%d %%%Lu M%Ld %%
All %d100 %%%Lu M100 %%
\n",f); } diff --git a/prometheus.conf.SAMPLE b/prometheus.conf.SAMPLE index a2d9594..01925f7 100644 --- a/prometheus.conf.SAMPLE +++ b/prometheus.conf.SAMPLE @@ -11,7 +11,12 @@ #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 #-------------------------------------------------------------------------- -- 2.30.2