New expansion operator: reverse_ip
[exim.git] / doc / doc-docbook / spec.xfpt
index 98048c6bc615f4e1d44e48268a133d3a7a905fa8..003ae6db83ebdbf5dda66ab5bc477de32aa6dc6f 100644 (file)
@@ -1,4 +1,4 @@
-. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.78 2010/06/05 21:42:53 pdp Exp $
+. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.79 2010/06/05 23:50:18 pdp Exp $
 .
 . /////////////////////////////////////////////////////////////////////////////
 . This is the primary source of the Exim Manual. It is an xfpt document that is
@@ -9615,6 +9615,21 @@ srandomdev() or srandom(), or a custom implementation even weaker than
 random().
 
 
+.vitem &*${reverse_ip:*&<&'ipaddr'&>&*}*&
+.cindex "expansion" "IP address"
+This operator reverses an IP address; for IPv4 addresses, the result is in
+dotted-quad decimal form, while for IPv6 addreses the result is in
+dotted-nibble hexadecimal form.  In both cases, this is the "natural" form
+for DNS.  For example,
+.code
+${reverse_ip:192.0.2.4} and ${reverse_ip:2001:0db8:c42:9:1:abcd:192.0.2.3}
+.endd
+returns
+.code
+4.2.0.192 and 3.0.2.0.0.0.0.c.d.c.b.a.1.0.0.0.9.0.0.0.2.4.c.0.8.b.d.0.1.0.0.2
+.endd
+
+
 .vitem &*${rfc2047:*&<&'string'&>&*}*&
 .cindex "expansion" "RFC 2047"
 .cindex "RFC 2047" "expansion operator"