commit test
[svn/Prometheus-QoS/.git] / prometheus.c
index 28d9894da561e8e115575bfd776de66902212fa5..0beef7a866ae1ee45fb786d270338ebdeafc7497 100644 (file)
@@ -7,8 +7,8 @@
 /*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
 \r
-/* Modified: xChaos, 20080407\r
-             ludva, 20071227\r
+/* Modified: xChaos, 20080422\r
+             ludva, 20080415\r
 \r
    Prometheus QoS is free software; you can redistribute it and/or\r
    modify it under the terms of the GNU General Public License as \r
 \r
 #include "cll1-0.6.h"\r
 \r
-const char *version="0.7.9.1"; /*0.7.9 will be last development, 0.8.0 first stable */\r
+const char *version="0.7.9.2"; /*0.7.9 will be last development, 0.8.0 first stable */\r
 \r
-/* ======= All path names are defined hear (for RPM patch) =======  */\r
+\r
+/* ======= All path names are defined here (for RPM patch) =======  */\r
 \r
 char *tc              = "/sbin/tc"; /* requires tc with HTB support */\r
 char *iptables        = "/sbin/iptables"; /* requires iptables utility */\r
@@ -755,7 +756,9 @@ program
  int parent=1;\r
  int just_flush=0;\r
  int nodelay=0;\r
- int just_preview=0;                   /* preview - generate just stats */\r
+ int just_preview=0;                /* preview - generate just stats */\r
+ int just_logs=0;                   /* just parse logs */\r
\r
  char *chain_forward, *chain_postrouting;\r
  char *althosts=NULL;\r
   \r
@@ -776,9 +779,9 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
   argument("-9") { just_flush=9; }\r
   argument("-p") { just_preview=1; }\r
   argument("-n") { nodelay=1; }\r
-  argument("-l") { just_preview=666; }\r
-  argument("-m") { just_preview=666; }\r
-  argument("-y") { just_preview=666; }\r
+  argument("-l") { just_logs=1; }\r
+  argument("-m") { just_logs=1; }\r
+  argument("-y") { just_logs=1; }\r
   argument("-?") { help(); exit(0); }\r
   argument("--help") { help(); exit(0); }\r
   argument("-v") { exit(0); } \r
@@ -795,10 +798,10 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
  /*-----------------------------------------------------------------*/\r
  get_config(config);\r
  \r
- if(just_preview == 666)\r
+ if(just_logs)\r
  {\r
-    parse_ip_log(argc,argv); \r
-    exit(0); \r
+    parse_ip_log(argc,argv);\r
+    exit(0);\r
  }\r
 \r
  if(althosts) hosts=althosts;\r
@@ -1373,8 +1376,8 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     iplog=fopen(str,"a");\r
     if(iplog)\r
     {\r
-     fprintf(iplog,"%ld\t%s\t%Lu\t%Lu\t%Lu\t%Lu\t%d\t%d\t%s",\r
-                    time(NULL),ip->name,ip->traffic,ip->direct,ip->proxy,ip->upload,ip->min,ip->max,d); /* d = date*/\r
+     fprintf(iplog,"%ld\t%s\t%Lu\t%Lu\t%Lu\t%Lu\t%d\t%d\t%d\t%s",\r
+                    time(NULL),ip->name,ip->traffic,ip->direct,ip->proxy,ip->upload,ip->min,ip->max,ip->desired,d); /* d = date*/\r
      fclose(iplog);\r
     }\r
    }\r
This page took 0.10671 seconds and 4 git commands to generate.