diff options
author | An-Cheng Huang <ancheng@build-vm.localdomain> | 2007-12-19 15:27:04 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@build-vm.localdomain> | 2007-12-19 15:27:04 -0800 |
commit | 56880bec43eef6af8301cdfbe9c764b4257bd24b (patch) | |
tree | a7ba2a4a6c73f93e0a94e2d2db9cda264bfec254 /templates-cfg | |
parent | 561ec07cb56696b05f683a325098c06422d00f86 (diff) | |
download | vyatta-nat-56880bec43eef6af8301cdfbe9c764b4257bd24b.tar.gz vyatta-nat-56880bec43eef6af8301cdfbe9c764b4257bd24b.zip |
* add completion help/value check.
* fix show command.
Diffstat (limited to 'templates-cfg')
4 files changed, 14 insertions, 8 deletions
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 c87d281..533a592 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,5 +1,4 @@ type: txt help: "Inbound interface of NAT traffic" -## iptables allow any interface names. -#syntax: exec "sh -c 'if grep -q '\\''^ \\+$(@):'\\'' /proc/net/dev; \ -#then exit 0; else exit 1; fi' " ; "invalid interface $(@)" +#allowed: ls /sys/class/net 2>/dev/null +#comp_help:Enter a network interface name, for example, "eth0" 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 bf3e8a2..096629f 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,5 +1,4 @@ type: txt help: "Outbound interface for NAT traffic" -## iptables allow any interface names. -#syntax: exec "sh -c 'if grep -q '\\''^ \\+$(@):'\\'' /proc/net/dev; \ -#then exit 0; else exit 1; fi' " ; "invalid interface $(@)" +#allowed: ls /sys/class/net 2>/dev/null +#comp_help:Enter a network interface name, for example, "eth0" diff --git a/templates-cfg/service/nat/rule/node.tag/protocols/node.def b/templates-cfg/service/nat/rule/node.tag/protocols/node.def index 75ccb86..619fad9 100644 --- a/templates-cfg/service/nat/rule/node.tag/protocols/node.def +++ b/templates-cfg/service/nat/rule/node.tag/protocols/node.def @@ -1,3 +1,8 @@ type: txt help: "Protocol to NAT (this can be a protocol name in /etc/protocols, a protocol number, or \"all\")" syntax: exec "/opt/vyatta/sbin/vyatta-validate-type.pl protocol_negate '$(@)'" ; "invalid protocol \"$(@)\"" +#comp_help:Possible completions: +# <name> A protocol name, for example, "tcp" +# <number> A protocol number +# all All protocols +#(Note: a protocol can also be negated, for example, "!tcp") diff --git a/templates-cfg/service/nat/rule/node.tag/type/node.def b/templates-cfg/service/nat/rule/node.tag/type/node.def index 9df10a9..831dd3b 100644 --- a/templates-cfg/service/nat/rule/node.tag/type/node.def +++ b/templates-cfg/service/nat/rule/node.tag/type/node.def @@ -1,4 +1,7 @@ type: txt help: "Source, destination, or masquerade NAT" -syntax: ($(@) == "source" || $(@) == "destination" || $(@) == "masquerade") ; \ -"invalid type $(@)" +syntax: $(@) in "source", "destination", "masquerade"; "invalid type $(@)" +#comp_help:Possible completions: +# source Source NAT +# destination Destination NAT +# masquerade Masquerade NAT |