NXSL:AddrInSubnet

Revision as of 18:13, 13 September 2022 by AlexKirhenshtein (talk | contribs) (Text replacement - "^" to "{{deprecated}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Checks if given IP address is within given subnet (including subnet and broadcast addresses).


Syntax

AddrInSubnet(address, subnet, mask);


Parameters

address IP address to check.
subnet Subnet address.
mask Subnet mask.

All IP addresses should be specified as strings.


Return Value

TRUE if address is within given subnet (including subnet and broadcast addresses), and FALSE otherwise.


Examples

AddrInSubnet("10.0.0.16", "10.0.0.0", "255.255.255.0")		->	TRUE
AddrInSubnet("10.0.0.16", "192.168.1.0", "255.255.255.0")	->	FALSE