A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.cfengine.com/latest/reference-functions-iprange.html below:

iprange - CFEngine 3.26 Docs

Prototype: iprange(range, optional_interface)

Return type: boolean

Description: Returns whether the current host lies in the range of IP addresses specified, optionally checking only interface.

Pattern matching based on IP addresses.

Arguments:

Example:

code

bundle agent example
{
classes:

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

  "dmz_1_eth0" expression => iprange("128.39.89.10-15", "eth0");
  "lab_1_eth0" expression => iprange("128.39.74.1/23", "eth0");

reports:

  dmz_1::

    "DMZ 1 subnet";

  lab_1::

    "Lab 1 subnet";
}

See also: isipinsubnet(), host2ip(), ip2host()

History:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4