Previous Section Next Section

$[ $]

Canonicalize hostname RHS operators

The $[ $] operators are used to convert a non-fully qualified hostname, or a CNAME, into the official, fully qualified hostname. They are also used to convert square bracket-enclosed addresses into hostnames. They must be used in a pair with the host or address to be looked up between them. To illustrate, consider this rule:

R $+ < @ $+ >           $: $1 < @ $[ $2 $] >

This rule will match a focused address such as gw<@wash> and cause the host part (the second $+ on the LHS) to be passed to the RHS (the $2). Because the $2 is between the pair of $[ $] operators, it is looked up with DNS and converted to a fully qualified hostname. Thus, the domain dc.gov, for example, will have the host wash fully qualified to become wash.dc.gov. These $[ $] operators can be used only on the RHS, and are fully described in Section 23.4.3.

    Previous Section Next Section