iprange

Table of Contents

Prototype: iprange(range)

Return type: boolean

Description: Returns whether the current host lies in the range of IP addresses specified.

Pattern matching based on IP addresses.

Arguments:

  • range: string, in the range: .*

Example:

bundle agent example
{
classes:

  "dmz_1" expression => iprange("128.39.89.10-15");
  "lab_1" expression => iprange("128.39.74.1/23");

reports:

  dmz_1::

    "DMZ 1 subnet";

  lab_1::

    "Lab 1 subnet";
}

See Also: host2ip(), ip2host()