X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=prometheus.c;h=5a9f0098d0864790e4ce8c0dd85c4d09a00c5455;hb=b07b9ac11b736259c3cbca6f345f15980d48341f;hp=a63c5a0e2b2b27d288aa84d1804b627ff70632dc;hpb=e0161edba41f7f5cf630f53ebc299f50aaa29d92;p=svn%2FPrometheus-QoS%2F.git diff --git a/prometheus.c b/prometheus.c index a63c5a0..5a9f009 100644 --- a/prometheus.c +++ b/prometheus.c @@ -31,7 +31,7 @@ #include "cll1.h" -const char *version="0.8.0"; +const char *version="0.7.7-1"; /*0.7.9 will be last development, 0.8.0 first stable */ /* ======= Help screen is hopefuly self-documenting part of code :-) ======= */ @@ -57,12 +57,12 @@ int filter_type=1; /*1 mark, 2 classify*/ char *mark="MARK"; char *mark_iptables="MARK --set-mark "; int dry_run=0; /* preview - use puts() instead of system() */ -char *config="/etc/prometheus.conf"; /* main configuration file */ -char *hosts="/etc/hosts"; /* line bandwidth definition file */ +char *config="/etc/prometheus/prometheus.conf"; /* main configuration file */ +char *hosts="/etc/prometheus/hosts"; /* line bandwidth definition file */ char *tc="/sbin/tc"; /* requires tc with HTB support */ -char *iptables="/usr/sbin/iptables"; /* requires iptables utility */ -char *iptablessave="/usr/sbin/iptables-save"; /* new */ -char *iptablesrestore="/usr/sbin/iptables-restore"; /* new */ +char *iptables="/sbin/iptables"; /* requires iptables utility */ +char *iptablessave="/sbin/iptables-save"; /* new */ +char *iptablesrestore="/sbin/iptables-restore"; /* new */ char *iptablesfile="/var/spool/prometheus.iptables"; /* new; file for iptables-restore*/ char *iptablespreamble="*mangle\n:PREROUTING ACCEPT [0:0]\n:POSTROUTING ACCEPT [0:0]\n:INPUT ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]"; FILE *iptables_file=NULL; @@ -72,7 +72,7 @@ char *cmdlog="/var/log/prometheus"; /* command log filename */ char *credit="/var/run/prometheus.credit"; /* credit log file */ int enable_credit=1; /* enable credit file */ int use_credit=0; /* use credit file (if enabled)*/ -char *log_dir="/var/www/html/logs/"; /* log directory pathname */ +char *log_dir="/var/www/logs/"; /* log directory pathname */ char *log_url="logs/"; /* log directory URL prefix */ char *title="Hall of Fame - Greatest Suckers"; /* hall of fame title */ int hall_of_fame=1; /* enable hall of fame */ @@ -486,7 +486,7 @@ void get_traffic_statistics(void) else sscanf(ptr,"%Lu",&traffic); traffic+=(1<<19); traffic>>=20; break; - case 3: if(strncmp(ptr,"post_",5) && strncmp(ptr,"forw_",5) || commonflag) + case 3: if((strncmp(ptr,"post_",5) && strncmp(ptr,"forw_",5)) || commonflag) accept=eq(ptr,mark); /*if (filter_type==1) accept=eq(ptr,"MARK"); else accept=eq(ptr,"CLASSIFY");*/ break;