Major rewrite of leading comments
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 14 Jan 2013 22:58:46 +0000 (22:58 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Mon, 14 Jan 2013 22:58:46 +0000 (22:58 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@208 251d49ef-1d17-4917-a970-b30cf55b089b

Makefile
help.c [new file with mode: 0644]
prometheus.c

index a47818e20b3c3d17576f797daa459ad98910ae83..2f89465c0ba0224815d209cdcbe486cfbc07d18a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ prefix=/usr
 mandir=$(prefix)/share/man
 sbindir=$(prefix)/sbin
 sysconfdir=/etc
 mandir=$(prefix)/share/man
 sbindir=$(prefix)/sbin
 sysconfdir=/etc
-OBJECTS=parsehosts.o parselogs.o ipv4subnets.o json.o htmlandlogs.o prometheus.o
+OBJECTS=parsehosts.o parselogs.o ipv4subnets.o json.o htmlandlogs.o help.o prometheus.o
 HEADERS=cll1-0.6.2.h ipstruct.h
 
 main: prometheus
 HEADERS=cll1-0.6.2.h ipstruct.h
 
 main: prometheus
diff --git a/help.c b/help.c
new file mode 100644 (file)
index 0000000..23c71b4
--- /dev/null
+++ b/help.c
@@ -0,0 +1,24 @@
+/* Modified by: xChaos, 20130114 */
+
+#include "cll1-0.6.2.h"
+
+void help(void)
+{
+ puts("Command line switches:\n\
+\n\
+-d   Dry run (preview tc and iptables commands on stdout)\n\
+-r   Run (reset all statistics and start shaping - daily usage)\n\
+-p   just generate Preview of data transfer statistics and exit (after -r)\n\
+-s   start Shaping FUP limits (keeps data transfer stat like -p) (after -r)\n\
+-n   run Now (like -r delay - overrides qos-free-delay keyword, after boot)\n\
+-f   just Flush iptables and tc classes and exit (stop shaping, no QiS)\n\
+-9   emergency iptables flush (like -f, but dumps data transfer statistics)\n\
+\n\
+-c filename  force alternative /etc/prometheus/prometheus.conf filename\n\
+-h filename  force alternative /etc/hosts filename (overrides hosts keyword)\n\
+-l Mmm YYYY  generate HTML summary of Logged traffic (Mmm=Jan-Dec) (and exit)\n\
+-m           generate HTML summary of traffic for yesterday's Month (and exit)\n\
+-y           generate HTML summary of traffic for yesterday's Year (and exit)\n\
+-? --help    show this help scree (and exit)\n\
+-v --version show Version number of this utility (and exit)\n");
+}
index 094008789cd56e3029e1e57641805463d2fb09bd..9743b30b271033548202234fab31a4900087a8f1 100644 (file)
@@ -1,13 +1,13 @@
-  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
- /*     Prometheus QoS - you can "steal fire" from your ISP     */\r
-/*      "fair-per-IP" quality of service (QoS) utility          */\r
-/*      requires Linux 2.4.x or 2.6.x with HTB support          */\r
-/*      Copyright(C) 2005-2013 Michael Polak, Arachne Labs      */\r
-/*    iptables-restore support Copyright(C) 2007-2008 ludva     */\r
-/*  Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */\r
-\r
-/* Modified by: xChaos, 20130107\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
+/* Prometheus QoS - you can "steal fire" from your ISP         */\r
+/* "fair-per-IP" quality of service (QoS) utility              */\r
+/* requires Linux 2.4.x or 2.6.x with HTB support              */\r
+/* Copyright(C) 2005-2013 Michael Polak, Arachne Aerospace     */\r
+/* iptables-restore support Copyright(C) 2007-2008 ludva       */\r
+/* Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf  */\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
+\r
+/* Modified by: xChaos, 20130114\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
                  ludva, 20080415\r
  \r
    Prometheus QoS is free software; you can redistribute it and/or\r
    \r
    GNU General Public License is located in file COPYING */\r
 \r
    \r
    GNU General Public License is located in file COPYING */\r
 \r
-#define STRLEN 512\r
-#undef DEBUG\r
-\r
 #include "cll1-0.6.2.h"\r
 #include "ipstruct.h"\r
 \r
 const char *version = "0.8.3-g";\r
 \r
 #include "cll1-0.6.2.h"\r
 #include "ipstruct.h"\r
 \r
 const char *version = "0.8.3-g";\r
 \r
-/* Version numbers: 0.8.3 is development releases ("beta"), 0.8.4 will be "stable" */\r
-/* Debian(RPM) package versions/patchlevels: 0.7.9-2, 0.8.0-1, 0.8.0-2, etc. */\r
-/* C source code development versions ("beta"): 0.7.9-a, 0.8.1-b, etc. */\r
-/* C source code release versions: 0.8.0, 0.8.2, 0.8.4, etc. */\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
+/* Versions: 0.8.3 is development release, 0.8.4 will be "stable"  */\r
+/* Official Trac URL: https://dev.arachne.cz/svn/prometheus        */\r
+/* Official SVN URL: https://dev.arachne.cz/repos/prometheus       */\r
+/* BTC donations account: 19rriLx8vR19wGefPaMhakqnCYNYwjLvxq       */\r
+/* CZK donations account: 2900242944/2010 (transparent account)    */\r
+/* Warning: unofficial Github mirror is not supported by author!  */\r
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
 \r
 const char *stats_html_signature = "<span class=\"small\">Statistics generated by Prometheus QoS version %s<br />GPL+Copyright(C)2005-2013 Michael Polak, <a target=\"_blank\" href=\"http://www.arachne.cz/\">Arachne Labs</a></span>\n";\r
 \r
 \r
 const char *stats_html_signature = "<span class=\"small\">Statistics generated by Prometheus QoS version %s<br />GPL+Copyright(C)2005-2013 Michael Polak, <a target=\"_blank\" href=\"http://www.arachne.cz/\">Arachne Labs</a></span>\n";\r
 \r
+#define STRLEN 512\r
+#undef DEBUG\r
+\r
 /* ======= Help screen is hopefuly self-documenting part of code :-) ======= */\r
 \r
 /* ======= Help screen is hopefuly self-documenting part of code :-) ======= */\r
 \r
-void help(void)\r
-{\r
- puts("Command line switches:\n\\r
-\n\\r
--d   Dry run (preview tc and iptables commands on stdout)\n\\r
--r   Run (reset all statistics and start shaping - daily usage)\n\\r
--p   just generate Preview of data transfer statistics and exit (after -r)\n\\r
--s   start Shaping FUP limits (keeps data transfer stat like -p) (after -r)\n\\r
--n   run Now (like -r delay - overrides qos-free-delay keyword, after boot)\n\\r
--f   just Flush iptables and tc classes and exit (stop shaping, no QiS)\n\\r
--9   emergency iptables flush (like -f, but dumps data transfer statistics)\n\\r
-\n\\r
--c filename  force alternative /etc/prometheus/prometheus.conf filename\n\\r
--h filename  force alternative /etc/hosts filename (overrides hosts keyword)\n\\r
--l Mmm YYYY  generate HTML summary of Logged traffic (Mmm=Jan-Dec) (and exit)\n\\r
--m           generate HTML summary of traffic for yesterday's Month (and exit)\n\\r
--y           generate HTML summary of traffic for yesterday's Year (and exit)\n\\r
--? --help    show this help scree (and exit)\n\\r
--v --version show Version number of this utility (and exit)\n");\r
-}\r
 \r
 /* ======= All path names are defined here (for RPM patch) =======  */\r
 \r
 \r
 /* ======= All path names are defined here (for RPM patch) =======  */\r
 \r
@@ -148,6 +132,9 @@ struct IP *ips = NULL, *ip, *sharedip;
 struct Group *groups = NULL, *group;\r
 struct Keyword *keyword, *defaultkeyword=NULL, *keywords=NULL;\r
 \r
 struct Group *groups = NULL, *group;\r
 struct Keyword *keyword, *defaultkeyword=NULL, *keywords=NULL;\r
 \r
+void help(void);\r
+/* implemented in help.c */
+\r
 void parse_ip_log(int argc, char **argv);\r
 /* implemented in parselog.c */\r
 \r
 void parse_ip_log(int argc, char **argv);\r
 /* implemented in parselog.c */\r
 \r
@@ -174,6 +161,7 @@ const char *tr_odd_even(void)
 }\r
 \r
 /* ==== This is C<<1 stuff - learn C<<1 first! https://dev.arachne.cz/svn/cll1h ==== */\r
 }\r
 \r
 /* ==== This is C<<1 stuff - learn C<<1 first! https://dev.arachne.cz/svn/cll1h ==== */\r
+/* (except that this code uses obsolete, archaic version of this header file...)     */\r
 \r
 struct Index\r
 {\r
 \r
 struct Index\r
 {\r
This page took 0.2043 seconds and 4 git commands to generate.