From 47d0c0f4f165a9729c3f68c4cd38b28f8ae0bcaa Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 16 Jul 2010 16:50:56 -0700 Subject: Allow text string for IP port match This allows use of IANA (/etc/services) values for port names: example: traffic-policy shaper SS { class 2 { match SMTP ip destination port smtp } } --- .../class/node.tag/match/node.tag/ip/destination/port/node.def | 7 ++++--- .../class/node.tag/match/node.tag/ip/source/port/node.def | 8 +++++--- .../node.tag/match/node.tag/ipv6/destination/port/node.def | 9 +++++---- .../class/node.tag/match/node.tag/ipv6/source/port/node.def | 10 ++++++---- 4 files changed, 20 insertions(+), 14 deletions(-) (limited to 'templates/traffic-policy/limiter') diff --git a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def index c067ef4..4b221ba 100644 --- a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def +++ b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def @@ -1,4 +1,5 @@ -type: u32 +type: txt help: IP destination port for this match -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" -val_help:<1-65535>; IP port + +val_help: u32:1-65535>; Numeric IP port +val_help: txt; Assigned IP port name diff --git a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/source/port/node.def b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/source/port/node.def index 89c241e..ad5e485 100644 --- a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/source/port/node.def +++ b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ip/source/port/node.def @@ -1,4 +1,6 @@ -type: u32 +type: txt help: IP source port for this match -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" -val_help:<1-65535>; IP port + +val_help: u32:1-65535>; Numeric IP port +val_help: txt; Assigned IP port name + diff --git a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/destination/port/node.def b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/destination/port/node.def index c067ef4..6fb393e 100644 --- a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/destination/port/node.def +++ b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/destination/port/node.def @@ -1,4 +1,5 @@ -type: u32 -help: IP destination port for this match -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" -val_help:<1-65535>; IP port +type: txt +help: IPv6 destination port for this match + +val_help: u32:1-65535>; Numeric IP port +val_help: txt; Assigned IP port name diff --git a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/source/port/node.def b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/source/port/node.def index 89c241e..f305799 100644 --- a/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/source/port/node.def +++ b/templates/traffic-policy/limiter/node.tag/class/node.tag/match/node.tag/ipv6/source/port/node.def @@ -1,4 +1,6 @@ -type: u32 -help: IP source port for this match -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" -val_help:<1-65535>; IP port +type: txt +help: IPv6 source port for this match + +val_help: u32:1-65535>; Numeric IP port +val_help: txt; Assigned IP port name + -- cgit v1.2.3