diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-07-20 17:25:00 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-07-20 17:25:00 -0700 |
commit | 23fee18d925a002650ee44963bb500ef23f23524 (patch) | |
tree | 7c3f1a4ac8e19e18ddb18f3a967ade82f56e9eb5 | |
parent | d38e65c3f74e12c141c587cbf5284421091516b5 (diff) | |
download | vyatta-nat-23fee18d925a002650ee44963bb500ef23f23524.tar.gz vyatta-nat-23fee18d925a002650ee44963bb500ef23f23524.zip |
Change comp_help to val_help.
15 files changed, 71 insertions, 38 deletions
diff --git a/templates-cfg/service/nat/node.def b/templates-cfg/service/nat/node.def index d59482f..63f8866 100644 --- a/templates-cfg/service/nat/node.def +++ b/templates-cfg/service/nat/node.def @@ -1,3 +1,5 @@ priority: 220 + help: Network Address Translation (NAT) parameters + end:expression: "sudo /opt/vyatta/sbin/vyatta-update-nat.pl" diff --git a/templates-cfg/service/nat/rule/node.def b/templates-cfg/service/nat/rule/node.def index d9b5687..c666be9 100644 --- a/templates-cfg/service/nat/rule/node.def +++ b/templates-cfg/service/nat/rule/node.def @@ -1,4 +1,11 @@ tag: + type: u32 + help: Rule number for NAT -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 10000) ; "rule number must be between 1 and 9999" + +syntax:expression: ($VAR(@) > 0 && $VAR(@) < 10000) ; \ + "Rule number must be between 1 and 9999." + +val_help: u32:1-9999 ; Number for this NAT rule + diff --git a/templates-cfg/service/nat/rule/node.tag/description/node.def b/templates-cfg/service/nat/rule/node.tag/description/node.def index dd2f535..90bf88b 100644 --- a/templates-cfg/service/nat/rule/node.tag/description/node.def +++ b/templates-cfg/service/nat/rule/node.tag/description/node.def @@ -1,2 +1,3 @@ type: txt + help: Rule description diff --git a/templates-cfg/service/nat/rule/node.tag/destination/address/node.def b/templates-cfg/service/nat/rule/node.tag/destination/address/node.def index d679092..4b5423b 100644 --- a/templates-cfg/service/nat/rule/node.tag/destination/address/node.def +++ b/templates-cfg/service/nat/rule/node.tag/destination/address/node.def @@ -1,9 +1,10 @@ type: txt + help: Destination IP address, subnet, or range -comp_help: Possible completions: - <x.x.x.x> IP address to match - <x.x.x.x/x> Subnet to match - <x.x.x.x>-<x.x.x.x> IP range to match - !<x.x.x.x> Match everything except the specified address - !<x.x.x.x/x> Match everything except the specified subnet - !<x.x.x.x>-<x.x.x.x> Match everything except the specified range + +val_help: ipv4 ; IP address to match +val_help: ipv4net; Subnet to match +val_help: <x.x.x.x>-<x.x.x.x> ; IP range to match +val_help: !<x.x.x.x> ; Match everything except the specified address +val_help: !<x.x.x.x/x> ; Match everything except the specified subnet +val_help: !<x.x.x.x>-<x.x.x.x> ; Match everything except the specified range diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port/node.def index 8989f99..760c0e8 100644 --- a/templates-cfg/service/nat/rule/node.tag/destination/port/node.def +++ b/templates-cfg/service/nat/rule/node.tag/destination/port/node.def @@ -1,5 +1,7 @@ type: txt + help: Destination port + comp_help: Destination port(s) can be specified as a comma-separated list of: <port name> Named port (any name in /etc/services, e.g., http) <1-65535> Numbered port diff --git a/templates-cfg/service/nat/rule/node.tag/inbound-interface/node.def b/templates-cfg/service/nat/rule/node.tag/inbound-interface/node.def index 46bb2db..69913d6 100644 --- a/templates-cfg/service/nat/rule/node.tag/inbound-interface/node.def +++ b/templates-cfg/service/nat/rule/node.tag/inbound-interface/node.def @@ -1,7 +1,11 @@ type: txt + help: Inbound interface of NAT traffic + enumeration: existing-interfaces -comp_help:Enter a network interface name, for example, "eth0" + +val_help: <interface> ; Interface name + commit:expression: exec " intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev)) intf_array_len=${#intf_array[*]} diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/address/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/address/node.def index d79dd47..b776ef6 100644 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/address/node.def +++ b/templates-cfg/service/nat/rule/node.tag/inside-address/address/node.def @@ -1,6 +1,7 @@ type: txt + help: Inside IP address or range for NAT -comp_help: Possible completions: - <x.x.x.x> NAT to the specified IP address - <x.x.x.x>-<x.x.x.x> NAT to the specified IP range - <x.x.x.x/x> NAT to the specified network address. Host part of the address will remain unchanged + +val_help: ipv4 ; NAT to the specified IP address +val_help: <x.x.x.x>-<x.x.x.x> ; NAT to the specified IP range +val_help: ipv4net ; NAT to the specified network address. Host part of the address will remain unchanged diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def index ba3b4ae..ab6f9d4 100644 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def +++ b/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def @@ -1,5 +1,6 @@ type: txt + help: Inside port -comp_help: The inside port can be one of the following: - <1-65535> Numbered port (between 1 and 65535) - <start>-<end> Numbered port range (e.g., 1001-1005) + +val_help: u32:1-65535 ; Numbered port +val_help: <start>-<end> ; Numbered port range (e.g., 1001-1005) diff --git a/templates-cfg/service/nat/rule/node.tag/log/node.def b/templates-cfg/service/nat/rule/node.tag/log/node.def index 2b54c63..867b471 100644 --- a/templates-cfg/service/nat/rule/node.tag/log/node.def +++ b/templates-cfg/service/nat/rule/node.tag/log/node.def @@ -1,3 +1,6 @@ type: txt + help: NAT rule logging -syntax:expression: $VAR(@) in "enable", "disable"; "NAT logging must be enable or disable" + +syntax:expression: $VAR(@) in "enable", "disable"; \ + "NAT logging must be enable or disable." diff --git a/templates-cfg/service/nat/rule/node.tag/outbound-interface/node.def b/templates-cfg/service/nat/rule/node.tag/outbound-interface/node.def index 1d62593..28e42e8 100644 --- a/templates-cfg/service/nat/rule/node.tag/outbound-interface/node.def +++ b/templates-cfg/service/nat/rule/node.tag/outbound-interface/node.def @@ -1,7 +1,11 @@ type: txt + help: Outbound interface for NAT traffic + enumeration: existing-interfaces -comp_help:Enter a network interface name, for example, "eth0" + +val_help: <interface> ; Interface name + commit:expression: exec " intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev)) intf_array_len=${#intf_array[*]} diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/address/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/address/node.def index 1a50e18..4b6d629 100644 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/address/node.def +++ b/templates-cfg/service/nat/rule/node.tag/outside-address/address/node.def @@ -1,6 +1,7 @@ type: txt + help: Outside IP address or range for NAT -comp_help: Possible completions: - <x.x.x.x> NAT to the specified IP address - <x.x.x.x>-<x.x.x.x> NAT to the specified IP range - <x.x.x.x/x> NAT to the specified network address. Host part of the address will remain unchanged + +val_help: ipv4 ; NAT to the specified IP address +val_help: <x.x.x.x>-<x.x.x.x> ; NAT to the specified IP range +val_help: ipv4net ; NAT to the specified network address. Host part of the address will remain unchanged diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def index 2dcf249..8e3b331 100644 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def +++ b/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def @@ -1,5 +1,6 @@ type: txt + help: Outside port -comp_help: The outside port can be one of the following: - <1-65535> Numbered port (between 1 and 65535) - <start>-<end> Numbered port range (e.g., 1001-1005) + +val_help: u32:1-65535 ; Numbered port +val_help: <start>-<end> ; Numbered port range (e.g., 1001-1005) diff --git a/templates-cfg/service/nat/rule/node.tag/protocol/node.def b/templates-cfg/service/nat/rule/node.tag/protocol/node.def index 0359398..9af7a8b 100644 --- a/templates-cfg/service/nat/rule/node.tag/protocol/node.def +++ b/templates-cfg/service/nat/rule/node.tag/protocol/node.def @@ -1,11 +1,13 @@ type: txt + help: Protocol to NAT (this can be a protocol name in /etc/protocols, a protocol number, or "all") -comp_help:Possible completions: - <text> An IP protocol name from /etc/protocols (e.g. "tcp" or "udp") - <0-255> An IP protocol number - tcp_udp Both TCP and UDP - all All IP protocols - !<protocol> All IP protocols except for the specified name or number (negation) + +val_help: txt ; IP protocol name from /etc/protocols (e.g. "tcp" or "udp") +val_help: u32:0-255 ; IP protocol number +val_help: tcp_udp ; Both TCP and UDP +val_help: all ; All IP protocols +val_help: !<protocol> ; All IP protocols except for the specified name or number (negation) + syntax:expression: exec "if [ -n \"`/opt/vyatta/sbin/vyatta-validate-type.pl protocol_negate '$VAR(@)'`\" ] \ && [ \"$VAR(@)\" != 'tcp_udp' ]; then \ echo invalid protocol \"$VAR(@)\" ; \ diff --git a/templates-cfg/service/nat/rule/node.tag/source/address/node.def b/templates-cfg/service/nat/rule/node.tag/source/address/node.def index 872bcf6..b1957cc 100644 --- a/templates-cfg/service/nat/rule/node.tag/source/address/node.def +++ b/templates-cfg/service/nat/rule/node.tag/source/address/node.def @@ -1,9 +1,10 @@ type: txt + help: Source IPv4 address, subnet, or range -comp_help: Possible completions: - <x.x.x.x> IP address to match - <x.x.x.x/x> Subnet to match - <x.x.x.x>-<x.x.x.x> IP range to match - !<x.x.x.x> Match everything except the specified address - !<x.x.x.x/x> Match everything except the specified subnet - !<x.x.x.x>-<x.x.x.x> Match everything except the specified range + +val_help: ipv4 ; IP address to match +val_help: ipv4net ; Subnet to match +val_help: <x.x.x.x>-<x.x.x.x> ; IP range to match +val_help: !<x.x.x.x> ; Match everything except the specified address +val_help: !<x.x.x.x/x> ; Match everything except the specified subnet +val_help: !<x.x.x.x>-<x.x.x.x> ; Match everything except the specified range diff --git a/templates-cfg/service/nat/rule/node.tag/source/port/node.def b/templates-cfg/service/nat/rule/node.tag/source/port/node.def index 4cec3cf..646232f 100644 --- a/templates-cfg/service/nat/rule/node.tag/source/port/node.def +++ b/templates-cfg/service/nat/rule/node.tag/source/port/node.def @@ -1,5 +1,7 @@ type: txt + help: Source port + comp_help: Source port(s) can be specified as a comma-separated list of: <port name> Named port (any name in /etc/services, e.g., http) <1-65535> Numbered port |