summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-05-06 10:12:45 +0200
committerPhil Sutter <phil@nwl.cc>2021-05-11 10:26:42 +0200
commitff2f54192eef3a0ca20c842f179ca73daf766b0f (patch)
tree31b6cf89681508d04387eaa48fdebf4879dab965 /doc
parentf87bcafe1360ae017bfe87ed6c63225a9ed0db2e (diff)
doc: Reduce size of NAT statement synopsis
Introduce non-terminals representing address and port which may represent ranges as well. Combined with dropping the distinction between PR_FLAGS and PRF_FLAGS, all the lines for each nat statement type can be combined. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'doc')
-rw-r--r--doc/statements.txt25
1 files changed, 10 insertions, 15 deletions
diff --git a/doc/statements.txt b/doc/statements.txt
index 6fc0bda0..7c7240c8 100644
--- a/doc/statements.txt
+++ b/doc/statements.txt
@@ -343,21 +343,16 @@ NAT STATEMENTS
~~~~~~~~~~~~~~
[verse]
____
-*snat to* 'address' [*:*'port'] ['PRF_FLAGS']
-*snat to* 'address' *-* 'address' [*:*'port' *-* 'port'] ['PRF_FLAGS']
-*snat* { *ip* | *ip6* } *to* 'address' *-* 'address' [*:*'port' *-* 'port'] ['PR_FLAGS']
-*dnat to* 'address' [*:*'port'] ['PRF_FLAGS']
-*dnat to* 'address' [*:*'port' *-* 'port'] ['PR_FLAGS']
-*dnat* { *ip* | *ip6* } *to* 'address' [*:*'port' *-* 'port'] ['PR_FLAGS']
-*masquerade to* [*:*'port'] ['PRF_FLAGS']
-*masquerade to* [*:*'port' *-* 'port'] ['PRF_FLAGS']
-*redirect to* [*:*'port'] ['PRF_FLAGS']
-*redirect to* [*:*'port' *-* 'port'] ['PRF_FLAGS']
-
-'PRF_FLAGS' := 'PRF_FLAG' [*,* 'PRF_FLAGS']
-'PR_FLAGS' := 'PR_FLAG' [*,* 'PR_FLAGS']
-'PRF_FLAG' := 'PR_FLAG' | *fully-random*
-'PR_FLAG' := *persistent* | *random*
+*snat* [[*ip* | *ip6*] *to*] 'ADDR_SPEC' [*:*'PORT_SPEC'] ['FLAGS']
+*dnat* [[*ip* | *ip6*] *to*] 'ADDR_SPEC' [*:*'PORT_SPEC'] ['FLAGS']
+*masquerade* [*to :*'PORT_SPEC'] ['FLAGS']
+*redirect* [*to :*'PORT_SPEC'] ['FLAGS']
+
+'ADDR_SPEC' := 'address' | 'address' *-* 'address'
+'PORT_SPEC' := 'port' | 'port' *-* 'port'
+
+'FLAGS' := 'FLAG' [*,* 'FLAGS']
+'FLAG' := *persistent* | *random* | *fully-random*
____
The nat statements are only valid from nat chain types. +