summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-07 10:46:43 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-07 15:56:10 -0700
commit31a8ab66f49ad26b376d552ec468b21e15835daf (patch)
tree50a0d0eb271f1bb830668ce018c3b1d7027570b5 /lib
parenta6fc0cd96c30422732fd4006dfed22fedc4c624d (diff)
downloadvyatta-cfg-qos-31a8ab66f49ad26b376d552ec468b21e15835daf.tar.gz
vyatta-cfg-qos-31a8ab66f49ad26b376d552ec468b21e15835daf.zip
Rearrange Qos commands for Larkspur
Current (Kenwood and earlier): set qos-policy traffic-shaper TS { ...classes } set qos-policy traffic-limiter TL { ...classes } seq qos-policy network-emulator NE ... set qos-policy random-detect RD ... set qos-policy rate-limiter RC ... set qos-policy round-robin RR ... set interfaces ethernet eth0 qos-policy out TS set interfaces ethernet eth0 qos-policy in TL New (Larkspur and later): set traffic-policy shaper TS { ...classes } set traffic-policy limiter TL { ...classes } seq traffic-policy network-emulator NE ... set traffic-policy random-detect RD ... set traffic-policy rate-control RC ... set traffic-policy round-robin RR ... set interfaces ethernet eth0 traffic-policy out TS set interfaces ethernet eth0 traffic-policy in TL set interfaces ethernet eth0 redirect ifb0 set interfaces ethernet eth0 mirror eth2 Note: 1. Only one of the following is allowed: "redirect", or "mirror" 2. Traffic-policy limiter is allowed with redirection/mirror and takes place before mirror/redirect action (NEW) 3. Limiter policy may applied on output (NEW) 4. Only limiter policies can be applied on input (same as previous releases) This does add some new functionality (#2, and #3) which are possible because of how filter classes are implemented.
Diffstat (limited to 'lib')
-rw-r--r--lib/Vyatta/Qos/IngressMirror.pm56
-rw-r--r--lib/Vyatta/Qos/IngressRedirect.pm55
2 files changed, 0 insertions, 111 deletions
diff --git a/lib/Vyatta/Qos/IngressMirror.pm b/lib/Vyatta/Qos/IngressMirror.pm
deleted file mode 100644
index d3e52c0..0000000
--- a/lib/Vyatta/Qos/IngressMirror.pm
+++ /dev/null
@@ -1,56 +0,0 @@
-# Ingress Mirror
-# Duplicate all packets to another interface
-# This is useful for some forms of IDS or capture
-#
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2010 Vyatta, Inc.
-# All Rights Reserved.
-# **** End License ****
-
-package Vyatta::Qos::IngressMirror;
-use strict;
-use warnings;
-
-require Vyatta::Config;
-
-sub new {
- my ( $that, $config, $name ) = @_;
- my $self = {};
- my $class = ref($that) || $that;
-
- bless $self, $class;
- $self->_define($config);
-
- return $self;
-}
-
-# Setup new instance.
-sub _define {
- my ( $self, $config ) = @_;
- # config is at level: interfaces ethernet $dev input-policy redirect
- $self->{_target} = $config->returnValue();
-}
-
-sub commands {
- my ( $self, $dev, $parent ) = @_;
- my $target = $self->{_target};
-
- # Apply filter to ingress qdisc
- # NB: action is egress because we are in ingress (upside down)
- printf "filter add dev %s parent %x: ", $dev, $parent;
- print " protocol all prio 10 u32";
- print " match u32 0 0 flowid 1:1";
- print " action mirred egress mirror dev $target\n";
-}
-
-1;
diff --git a/lib/Vyatta/Qos/IngressRedirect.pm b/lib/Vyatta/Qos/IngressRedirect.pm
deleted file mode 100644
index 2bffd30..0000000
--- a/lib/Vyatta/Qos/IngressRedirect.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-# Ingress Redirect
-# Forward all packets to another interface
-#
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2010 Vyatta, Inc.
-# All Rights Reserved.
-# **** End License ****
-
-package Vyatta::Qos::IngressRedirect;
-use strict;
-use warnings;
-
-require Vyatta::Config;
-
-sub new {
- my ( $that, $config, $name ) = @_;
- my $self = {};
- my $class = ref($that) || $that;
-
- bless $self, $class;
- $self->_define($config);
-
- return $self;
-}
-
-# Setup new instance.
-sub _define {
- my ( $self, $config, $dev ) = @_;
- # config is at level: interfaces ethernet $dev input-policy redirect
- $self->{_target} = $config->returnValue();
-}
-
-sub commands {
- my ( $self, $dev, $parent ) = @_;
- my $target = $self->{_target};
-
- # Apply filter to ingress qdisc
- # NB: action is egress because we are in ingress (upside down)
- printf "filter add dev %s parent %x: ", $dev, $parent;
- print " protocol all prio 10 u32";
- print " match u32 0 0 flowid 1:1";
- print " action mirred egress redirect dev $target\n";
-}
-
-1;