+
+
+
+
+END
+;
+ &Header::closebox();
+ print <
+END
+;
+ &level7rule();
+ print <
+
+END
+;
+ &portrule();
+ print <
+
+END
+;
+ &tosrule();
+ print <
+END
+;
&Header::closebigbox();
&Header::closepage();
exit
@@ -457,9 +689,10 @@ if ($errormessage) {
############################################################################################################################
&Header::openbox('100%', 'center', 'Quality of Service');
+
print <
- ";
&Header::closebox();
if ( ($qossettings{'OUT_SPD'} eq '') || ($qossettings{'INC_SPD'} eq '') ) {
&changebandwidth();
- &Header::closebox();
&Header::closebigbox();
&Header::closepage();
exit
@@ -514,9 +758,31 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq ''
exit
}
-&showclasses();
-&showl7rules();
-&showportrules();
+&Header::openbox('100%', 'center', $Lang::tr{'info'});
+&Graphs::overviewgraph("3240",$qossettings{'RED_DEV'});
+&Graphs::overviewgraph("3240",$qossettings{'IMQ_DEV'});
+print <
+ $Lang::tr{'add subclass'} | $Lang::tr{'Add Rule'} | $Lang::tr{'edit'} | $Lang::tr{'delete'}
+ $Lang::tr{'TOS Bits'}: 0 - $Lang::tr{'disabled'} | 8 - $Lang::tr{'min delay'} | 4 - $Lang::tr{'max throughput'} | 2 - $Lang::tr{'max reliability'} | 1 - $Lang::tr{'min costs'}
+END
+;
+if (( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'RED_DEV'}-3240.png") && ( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'IMQ_DEV'}-3240.png")) {
+ print <
+
+END
+;}
+else
+{
+print "\t ".$Lang::tr{'no information available'};
+}
+print "\t";
+
+&Header::closebox();
+
+&showclasses($qossettings{'RED_DEV'});
+&showclasses($qossettings{'IMQ_DEV'});
&Header::closebigbox();
&Header::closepage();
@@ -525,11 +791,11 @@ if ( ($qossettings{'DEFCLASS_INC'} eq '') || ($qossettings{'DEFCLASS_OUT'} eq ''
############################################################################################################################
sub changedefclasses {
- &Header::openbox('100%', 'center', 'Standardklassen:');
+ &Header::openbox('100%', 'center', $Lang::tr{'std classes'});
print <
- Legen sie hier die Standardklassen fest durch die nicht-gefilterte Pakete gehen.
+ $Lang::tr{'no filter pass'}
Download:
END
;
@@ -553,9 +819,9 @@ END
print <
-
+
END
;
- &Header::closebox();
+ &Header::closebox();
}
sub changebandwidth {
- &Header::openbox('100%', 'center', 'Bandbreiteneinstellungen');
+ &Header::openbox('100%', 'center', $Lang::tr{'bandwithsettings'});
if ($qossettings{'ENABLED'} eq 'on') {
- print "Sie koennen die Bandbreiteneinstellungen nicht bearbeiten, wenn QoS eingeschaltet ist. Schalten sie es zuerst dazu aus.";
- print "Zurueck ";
+ print "$Lang::tr{'bandwitherror'}";
+ print "$Lang::tr{'back'} ";
} else {
print <
-
+
+ $Lang::tr{'template warning'}
END
;
}
@@ -600,7 +866,7 @@ END
}
sub parentclass {
- &Header::openbox('100%', 'center', 'Parentklasse');
+ &Header::openbox('100%', 'center', $Lang::tr{'parentclass'});
print <
END
;
@@ -686,7 +971,7 @@ END
}
sub subclass {
- &Header::openbox('100%', 'center', 'Unterklasse');
+ &Header::openbox('100%', 'center', $Lang::tr{'Subclass'});
print <
END
;
@@ -751,7 +1046,7 @@ END
}
sub level7rule {
- &Header::openbox('100%', 'center', 'Level7-Regel');
+ &Header::openbox('100%', 'center', $Lang::tr{'Level7 Rule'});
print <
END
;
@@ -796,12 +1091,12 @@ END
}
sub portrule {
- &Header::openbox('100%', 'center', 'Port-Regel hinzufuegen');
+ &Header::openbox('100%', 'center', $Lang::tr{'Add Port Rule'});
print <
+END
+;
+ &Header::closebox();
+}
+
+sub tosrule {
+ &Header::openbox('100%', 'center', $Lang::tr{'TOS Rule'});
+ if ($qossettings{'TOS'}) {
+ $checked{$qossettings{'TOS'}} = "checked";
+ }
+ print <
+
END
;
@@ -839,6 +1161,7 @@ END
}
sub showclasses {
+ $qossettings{'DEV'} = shift;
open( FILE, "< $classfile" ) or die "Unable to read $classfile";
@classes = ;
close FILE;
@@ -846,300 +1169,285 @@ sub showclasses {
open( FILE, "< $subclassfile" ) or die "Unable to read $subclassfile";
@subclasses = ;
close FILE;
- &Header::openbox('100%', 'center', 'Klassen');
- print <
- Interface
- Klasse
- Prioritaet
- Garantierte Bandbreite
- Maximale Bandbreite
- Burst
- Ceil Burst
- Aktionen
-END
-;
+ open( FILE, "< $level7file" ) or die "Unable to read $level7file";
+ @l7rules = ;
+ close FILE;
+ open( FILE, "< $tosfile" ) or die "Unable to read $tosfile";
+ @tosrules = ;
+ close FILE;
+ open( FILE, "< $portfile" ) or die "Unable to read $portfile";
+ @portrules = ;
+ close FILE;
foreach $classentry (sort @classes)
{
@classline = split( /\;/, $classentry );
- if ( $classline[0] eq $qossettings{'RED_DEV'} )
+ if ( $classline[0] eq $qossettings{'DEV'} )
{
+ &Header::openbox('100%', 'center', "Klasse: $classline[1]");
print <
- $classline[0]
- $classline[1]
- $classline[2]
- $classline[3]
- $classline[4]
- $classline[5]
- $classline[6]
-
-
-
-
-
-
-
+
+ $Lang::tr{'interface'}
+ $Lang::tr{'Class'}
+ $Lang::tr{'priority'}
+ $Lang::tr{'guaranteed bandwith'}
+ $Lang::tr{'max bandwith'}
+ Burst
+ Ceil Burst
+ TOS
+ $Lang::tr{'action'}
+ $classline[0]
+ $classline[1]
+ $classline[2]
+ $classline[3]
+ $classline[4]
+ $classline[5]
+ $classline[6]
+ $classline[7]
+
+
+
+ $Lang::tr{'remark'}:
+ $classline[8]
+ Queueing: $classline[9]
END
;
- foreach $subclassentry (sort @subclasses)
- {
- @subclassline = split( /\;/, $subclassentry );
- if ( $subclassline[1] eq $classline[1] ) {
- print <
- Subklasse:
- $subclassline[2]
- $subclassline[3]
- $subclassline[4]
- $subclassline[5]
- $subclassline[6]
- $subclassline[7]
-
-
-
-
-
-
+
+ if (@l7rules) {
+ foreach $l7ruleentry (sort @l7rules)
+ {
+ @l7ruleline = split( /\;/, $l7ruleentry );
+ if ( $l7ruleline[0] eq $classline[1] )
+ {
+ print <$Lang::tr{'Level7 Protocol'}:
+ $l7ruleline[2]
+
+
END
;
- }
- }
- }
- }
- print "\t ";
- foreach $classentry (sort @classes)
- {
- @classline = split( /\;/, $classentry );
- if ( $classline[0] eq $qossettings{'IMQ_DEV'} )
- {
- print <
- $classline[0]
- $classline[1]
- $classline[2]
- $classline[3]
- $classline[4]
- $classline[5]
- $classline[6]
-
-
-
-
-
-
-
+ if (($l7ruleline[3] ne "") || ($l7ruleline[4] ne "")){
+ print <
+ $Lang::tr{'source ip'}: $l7ruleline[3]
+ $Lang::tr{'destination ip'}: $l7ruleline[4]
END
;
- foreach $subclassentry (sort @subclasses)
- {
- @subclassline = split( /\;/, $subclassentry );
- if ( $subclassline[1] eq $classline[1] ) {
- print <
- Subklasse:
- $subclassline[2]
- $subclassline[3]
- $subclassline[4]
- $subclassline[5]
- $subclassline[6]
- $subclassline[7]
-
-
-
-
-
-
+ }
+
+
END
;
- }
+ }
+ }
}
- }
- }
- print <Legende: Klasse bearbeiten | Unterklasse hinzufuegen | Level7-Regel hinzufuegen | Port-Regel hinzufuegen | Klasse loeschen
-
+
+
+ if (@portrules) {
+ foreach $portruleentry (sort @portrules)
+ {
+ @portruleline = split( /\;/, $portruleentry );
+ if ( $portruleline[0] eq $classline[1] )
+ {
+ print <$Lang::tr{'Port Rule'}:
+ ($portruleline[2])
+
END
;
- &Header::closebox();
- }
-}
-
-sub showl7rules {
- open( FILE, "< $level7file" ) or die "Unable to read $level7file";
- @l7rules = ;
- close FILE;
- if (@l7rules) {
- &Header::openbox('100%', 'center', 'Level7-Regeln');
- print <
- Interface
- Klasse
- Protokoll
- Quell-IP-Adresse
- Ziel-IP-Adresse
- Aktionen
+ if ($portruleline[4]) {
+ print <Quell-Port: $portruleline[4]
END
;
- foreach $l7ruleentry (sort @l7rules)
- {
- @l7ruleline = split( /\;/, $l7ruleentry );
- if ( $l7ruleline[1] eq $qossettings{'RED_DEV'} )
- {
- print <
- $l7ruleline[1]
- $l7ruleline[0]
- $l7ruleline[2]
- $l7ruleline[3]
- $l7ruleline[4]
-
-
-
-
+ }
+ print "";
+ if ($portruleline[6]) {
+ print <Ziel-Port: $portruleline[6]
END
;
- }
- }
- print "\t";
- foreach $l7ruleentry (sort @l7rules)
- {
- @l7ruleline = split( /\;/, $l7ruleentry );
- if ( $l7ruleline[1] eq $qossettings{'IMQ_DEV'} )
- {
- print <
- $l7ruleline[1]
- $l7ruleline[0]
- $l7ruleline[2]
- $l7ruleline[3]
- $l7ruleline[4]
-
-
-
-
+ }
+ print <
+
+
END
;
- }
- }
- print <Legende: Regel bearbeiten | Regel loeschen
-
+ if (($portruleline[3] ne "") || ($portruleline[5] ne "")){
+ print <
+ $Lang::tr{'source ip'}: $portruleline[3]
+ $Lang::tr{'destination ip'}: $portruleline[5]
END
;
- &Header::closebox();
- }
-}
+ }
+ }
+ }
+ }
-sub showportrules {
- open( FILE, "< $portfile" ) or die "Unable to read $portfile";
- @portrules = ;
- close FILE;
- if (@portrules) {
- &Header::openbox('100%', 'center', 'Port-Regeln');
- print <
- Interface
- Klasse
- Protokoll
- Quell-IP-Adresse
- Quell-Port
- Ziel-IP-Adresse
- Ziel-Port
- Aktionen
+ if (@tosrules) {
+ foreach $tosruleentry (sort @tosrules)
+ {
+ @tosruleline = split( /\;/, $tosruleentry );
+ if ( $tosruleline[0] eq $classline[1] )
+ {
+ print <
+ TOS Bit matches:
+
END
;
- foreach $portruleentry (sort @portrules)
- {
- @portruleline = split( /\;/, $portruleentry );
- if ( $portruleline[1] eq $qossettings{'RED_DEV'} )
- {
- print <
- $portruleline[1]
- $portruleline[0]
- $portruleline[2]
- $portruleline[3]
- $portruleline[4]
- $portruleline[5]
- $portruleline[6]
-
-
-
-
-
-
-
-
-
-
+ if ( $tosruleline[2] eq "8") {
+ print "$Lang::tr{'min delay'}\n";
+ } elsif ( $tosruleline[2] eq "4") {
+ print "$Lang::tr{'max throughput'}\n";
+ } elsif ( $tosruleline[2] eq "2") {
+ print "$Lang::tr{'max reliability'}\n";
+ } elsif ( $tosruleline[2] eq "1") {
+ print "$Lang::tr{'min costs'}\n";
+ } else { print " \n"; }
+
+ print <
+
END
;
- }
- }
- print "\t";
- foreach $portruleentry (sort @portrules)
- {
- @portruleline = split( /\;/, $portruleentry );
- if ( $portruleline[1] eq $qossettings{'IMQ_DEV'} )
- {
- print <
- $portruleline[1]
- $portruleline[0]
- $portruleline[2]
- $portruleline[3]
- $portruleline[4]
- $portruleline[5]
- $portruleline[6]
-
-
-
-
-
-
-
-
-
-
+ }
+ }
+ }
END
;
- }
- }
- print <Legende: Regel bearbeiten | Regel loeschen
-
+ foreach $subclassentry (sort @subclasses)
+ {
+ @subclassline = split( /\;/, $subclassentry );
+ if ( $subclassline[1] eq $classline[1] ) {
+ print <$Lang::tr{'Subclass'}:
+ $subclassline[2]
+ $subclassline[3]
+ $subclassline[4]
+ $subclassline[5]
+ $subclassline[6]
+ $subclassline[7]
+ $subclassline[8]
+
+
END
;
- &Header::closebox();
+ }
+ }
+ print <
+END
+;
+ &Header::closebox();
+ }
+ }
+ }
}
-}
sub expert
{
- &Header::openbox('100%', 'center', 'Expertenoptionen:');
+ &Header::openbox('100%', 'center', $Lang::tr{'expertoptions'});
print <
-
-
END
@@ -1154,9 +1462,9 @@ sub validminbwdth {
} elsif ( $qossettings{'DEVICE'} eq $qossettings{'IMQ_DEV'} ) {
$qossettings{'SPD'} = $qossettings{'INC_SPD'};
}
- unless ( ( $qossettings{'MINBDWTH'} >= 0 ) && ( $qossettings{'MINBDWTH'} <= $qossettings{'SPD'} ) ) {
+ unless ( ( $qossettings{'MINBWDTH'} >= 1 ) && ( $qossettings{'MINBWDTH'} <= $qossettings{'SPD'} ) ) {
$qossettings{'VALID'} = 'no';
- $message = "Mindestbandbreite ist ungueltig.";
+ $message = "$Lang::tr{'false min bandwith'}";
}
$qossettings{'SPD'} = '';
}
@@ -1171,7 +1479,7 @@ sub validmaxbwdth {
}
unless ( ( $qossettings{'MAXBDWTH'} >= 0 ) && ($qossettings{'MAXBDWTH'} >= $qossettings{'MINBDWTH'}) &&( $qossettings{'MAXBDWTH'} <= $qossettings{'SPD'} ) ) {
$qossettings{'VALID'} = 'no';
- $message = "Mamimalbandbreite ist ungueltig.";
+ $message = "$Lang::tr{'false max bandwith'}";
}
$qossettings{'SPD'} = '';
}
@@ -1182,7 +1490,7 @@ sub validclass {
if ( $qossettings{'DEVICE'} eq $qossettings{'RED_DEV'} ) {
if ($qossettings{'CLASS'} lt 100 || $qossettings{'CLASS'} ge 121) {
$qossettings{'VALID'} = 'no';
- $message = "Die Klassennummer passt nicht zum angegebenen Interface.";
+ $message = "$Lang::tr{'false classnumber'}";
}
} elsif ( $qossettings{'DEVICE'} eq $qossettings{'IMQ_DEV'} ) {
if ($qossettings{'CLASS'} lt 200 || $qossettings{'CLASS'} ge 221) {
@@ -1199,7 +1507,7 @@ sub validclass {
if ( $tmpline[1] eq $qossettings{'CLASS'} )
{
$qossettings{'VALID'} = 'no';
- $message = "Die aktuelle Klasse wird bereits verwendet.";
+ $message = "$Lang::tr{'false classnumber'}";
last
}
}
@@ -1217,7 +1525,7 @@ sub validsubclass {
if ( $tmpline[2] eq $qossettings{'SCLASS'} )
{
$qossettings{'VALID'} = 'no';
- $message = "Die aktuelle Klasse wird bereits verwendet.";
+ $message = "$Lang::tr{'class in use'}";
last
}
}