]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/qosd
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / src / scripts / qosd
index dee8ee2014ff08567b294d8558d9c91e839c03fb..64a341322e50e4f5611b1a138f4931f104b4711f 100644 (file)
@@ -1,56 +1,35 @@
 #!/usr/bin/perl -w
-use strict;
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
-##########################################
-##
-## DESCRIPTION
-##
-##   The tc-graph daemon script: "tc-collector"
-##   Which is part of the ADSL-optimizer.
-##
-##   The script will become a daemon and periodically collect data
-##   from the Linux traffic control system.  The collected data is
-##   stored in some RRD-data files, which is created automatically by
-##   the script if they don't exist.
-##
-## GRAPHs
-##
-##   How the RRD-data is displayed as graphs is not part of the
-##   tc-collector tool.  But we recommend using the RRD-frontend 'ddraw'.
-##   We have included some 'ddraw' examples (which is hardcoded to use
-##   files from '/var/spool/rrdqueues').
-##
-##      drraw:  http://web.taranis.org/drraw/
-##
-##
-## REQUIRES
-##
-##   RRDtools Perl interface RRDs
-##   The "tc" command.
-##
-##
-## AUTHOR
-##   Jesper Dangaard Brouer <hawk@diku.dk>, d.16/4-2004
-##
-## CHANGELOG
-##   2004-04-16:  Initial version.
-##   2004-05-27:  Daemon version.
-##
-## $Id: tc-collector.pl,v 1.12 2005/03/19 19:31:08 hawk Exp $
-##########################################
-
-# TODO:
-#  * Calc time used to parse, use to make time steps more precise
-#  * Device list support
-#  * Detecting the correct devices
+use strict;
 
 # Configuration options:
 #
 my  $device        = "$ARGV[0]";
 
-my %mainsettings = ();
+our %mainsettings = ();
+require '/var/ipfire/general-functions.pl';
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
 
+our $rrd_datadir   = $mainsettings{'RRDLOG'}."/";
 our $event_datadir = $mainsettings{'RRDLOG'};
 our $STEP          = 10;
 our $tc_command    = "/sbin/tc";
@@ -108,8 +87,6 @@ until ($time_to_die) {
     #  print " Error updating RRDs: \"$res\"\n";
     #}
 
-    process_events();
-
 #    my $timestamp = time;
 #    print "$timestamp\n";