Given the IP address of a device,
returns true if the configuration setting $setting_name matches that device,
else returns false.
If the setting is undefined or empty,
then check_no also returns false.

print "rejected!" if check_no($ip, 'discover_no');

There are several options for what $setting_name can contain:

Hostname, IP address, IP prefix

IP address range, using a hyphen and no whitespace

Regular Expression in YAML format which will match the device DNS name, e.g.:

- !!perl/regexp ^sep0.*$

"model:regex" - matched against the device model

"vendor:regex" - matched against the device vendor

To simply match all devices, use "any" or IP Prefix "0.0.0.0/0". All regular expressions are anchored (that is, they must match the whole string). To match no devices we recommend an entry of "localhost" in the setting.

Given the IP address of a device, returns true if the configuration setting $setting_name matches that device, else returns false. If the setting is undefined or empty, then check_only also returns true.

print "rejected!" unless check_only($ip, 'discover_only');

There are several options for what $setting_name can contain:

Hostname, IP address, IP prefix

IP address range, using a hyphen and no whitespace

Regular Expression in YAML format which will match the device DNS name, e.g.:

- !!perl/regexp ^sep0.*$

"model:regex" - matched against the device model

"vendor:regex" - matched against the device vendor

To simply match all devices, use "any" or IP Prefix "0.0.0.0/0". All regular expressions are anchored (that is, they must match the whole string). To match no devices we recommend an entry of "localhost" in the setting.