summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-09 16:51:59 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-09 16:51:59 -0800
commit0fdf5d942a6577a625b81eab2651af5f0d7afed5 (patch)
tree1960f3717be59a1fdfde96cbcf8557b6bd18ad92 /scripts
parent326ee1c8565c55315275771f73aae4d0d1a27cf9 (diff)
downloadvyatta-cfg-qos-0fdf5d942a6577a625b81eab2651af5f0d7afed5.tar.gz
vyatta-cfg-qos-0fdf5d942a6577a625b81eab2651af5f0d7afed5.zip
Add support for network emulation
New QoS feature to allow emulating WAN characteristics
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-qos-util.pl10
-rwxr-xr-xscripts/vyatta-qos.pl1
2 files changed, 3 insertions, 8 deletions
diff --git a/scripts/vyatta-qos-util.pl b/scripts/vyatta-qos-util.pl
index a19baee..9bb2ea1 100755
--- a/scripts/vyatta-qos-util.pl
+++ b/scripts/vyatta-qos-util.pl
@@ -24,13 +24,8 @@ use Vyatta::Qos::Util qw( getPercent getRate getBurstSize getProtocol
use Getopt::Long;
sub getPercentOrRate {
- my $percent = shift;
- if ( $percent =~ /%$/ ) {
- return getPercent($percent);
- }
- else {
- return getRate($percent);
- }
+ my $rate = shift;
+ return ( $rate =~ /%$/ ) ? getPercent($rate) : getRate($rate);
}
sub usage {
@@ -57,4 +52,3 @@ GetOptions(
"tos=s" => sub { getDsfield( $_[1] ); },
"time=s" => sub { getTime( $_[1] ); },
) or usage();
-
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 10f8610..5db9025 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -45,6 +45,7 @@ my %policies = (
'fair-queue' => 'FairQueue',
'rate-limit' => 'RateLimiter',
'drop-tail' => 'DropTail',
+ 'network-emulator' => 'NetworkEmulator',
},
'in' => {
'traffic-limiter' => 'TrafficLimiter',