Manual Chapter : Tcl syntax notes

Applies To:

  • BIG-IP APM

    15.1.8, 15.1.7, 15.1.6, 15.1.5, 15.1.4, 15.1.3, 15.1.2, 15.1.1, 15.1.0

Tcl syntax notes

Access Policy Manager (APM) supports standard Tcl syntax and additional commands and operators listed in the table.

APM supports the various facilities provided by the Tcl language; for example, loops (while, foreach, and so on), conditions (ifelse, switch, and so on), functions (proc), and built-in Tcl commands (strings, split, and so on), as well as various Tcl operators.

In addition to standard Tcl syntax, APM supports these commands and operators:

  • mcget command
  • Rule operators: A rule operator compares two operands in an expression.
  • Logical operators: A logical operator compares two values in an expression.

Important: iRules on the BIG-IP system can provide functionality to the BIG-IP system components. However, Tcl commands that are specific to iRules are not available in access policy rules.

Command or Operator Type Description
mcget Command mcget is an abbreviation for: get the session variable from the memory cache. Access Policy Manager (APM) stores all session variables generated in a session in its memory cache. When evaluating a branch rule, APM accesses session variables from system memory using the Tcl command mcget.
contains Rule operator Tests whether one string contains another string.
ends_with Rule operator Tests whether one string ends with another string.
equals Rule operator Tests whether one string equals another string.
matches Rule operator Tests whether one string matches another string.
matches_regex Rule operator Tests whether one string matches a regular expression.
starts_with Rule operator Tests whether one string starts_with another string.
switch Rule operator Evaluates one of several scripts, depending on a given value.
and Logical operator Performs a logical and comparison between two values.
not Logical operator Performs a logical not action on a value.
or Logical operator Performs a logical or comparison between two values.