diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-08-08 17:34:49 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-08-08 17:34:49 +0100 |
commit | c51f713eebe21071f22d0830fdaeb274b1a77059 (patch) | |
tree | 95da2d585f5a8556aed7bed8f5f056d0d6c12d56 /doc | |
parent | b003ce30f0038c2042303d18fc24f278de06a1f5 (diff) |
Expansions: mask_n operator
Diffstat (limited to 'doc')
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 17 | ||||
-rw-r--r-- | doc/doc-txt/NewStuff | 2 |
2 files changed, 16 insertions, 3 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 0385de6db..e766b69e2 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -11228,7 +11228,8 @@ empty. The parsing correctly handles SMTPUTF8 Unicode in the string. -.vitem &*${mask:*&<&'IP&~address'&>&*/*&<&'bit&~count'&>&*}*& +.vitem &*${mask:*&<&'IP&~address'&>&*/*&<&'bit&~count'&>&*}*& &&& + &*${mask_n:*&<&'IP&~address'&>&*/*&<&'bit&~count'&>&*}*& .cindex "masked IP address" .cindex "IP address" "masking" .cindex "CIDR notation" @@ -11242,8 +11243,14 @@ the result back to text, with mask appended. For example, .code ${mask:10.111.131.206/28} .endd -returns the string &"10.111.131.192/28"&. Since this operation is expected to -be mostly used for looking up masked addresses in files, the result for an IPv6 +returns the string &"10.111.131.192/28"&. + +Since this operation is expected to +be mostly used for looking up masked addresses in files, the +.new +normal +.wen +result for an IPv6 address uses dots to separate components instead of colons, because colon terminates a key string in lsearch files. So, for example, .code @@ -11253,6 +11260,10 @@ returns the string .code 3ffe.ffff.836f.0a00.000a.0800.2000.0000/99 .endd +.new +If the optional form &*mask_n*& is used, IPv6 address result are instead +returned in normailsed form, using colons and with zero-compression. +.wen Letters in IPv6 addresses are always output in lower case. diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 478446b41..1d6190b29 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -11,6 +11,8 @@ Version 4.96 1. A new ACL condition: seen. Records/tests a timestamp against a key. + 2. A variant of the "mask" expansion operator to give normalised IPv6. + Version 4.95 ------------ |