Pre-defined Expansions

In addition to storing attribute references, the server has a number of pre-defined references, as follows:

  • %{conf:…​}

    • Refers to a variable in the configuration file. See the documentation on configuration file references.

  • %{client:…​}

    • Refers to a variable that was defined in the client section for the current client.

  • %{listen:…​}

    • Refers to a variable that was defined in the listen section that received the packet. This definition is only available in version 2.1.11 and later.

  • %{0}

    • Refers to the string that was last used to match a regular expression. The variables %{1} through %{8} refer to the matched substring in the regular expression.

  • %{md5:…​}

    • Dynamically expands the string and performs an MD5 hash on it. The result is 32 hex digits.

  • %{Packet-Type}

    • The packet type (Access-Request, etc.)

  • %{Packet-SRC-IP-Address} %{Packet-SRC-IPv6-Address}

    • The source IPv4 or IPv6 address of the packet. See also the expansions %{client:ipaddr} and %{client:ipv6addr}. The two expansions should be identical, unless %{client:ipaddr} contains a DNS hostname.

  • %{Packet-DST-IP-Address} %{Packet-DST-IPv6-Address}

    • The destination IPv4 or IPv6 address of the packet. See also the expansions %{listen:ipaddr} and %{listen:ipv6addr}. If the socket is listening on a "wildcard" address, then these two expansions will be different, as follows: the %{listen:ipaddr} will be the wildcard address and %{Packet-DST-IP-Address} will be the unicast address to which the packet was sent.

  • %{Packet-SRC-Port} %{Packet-DST-Port}

    • The source/destination ports associated with the packet.

  • %{tolower:…​}

    • Dynamically expands the string and returns the lowercase version of it. This definition is only available in version 2.1.10 and later.

  • %{toupper:…​}

    • Dynamically expands the string and returns the uppercase version of it. This definition is only available in version 2.1.10 and later.