NXSL:AddrInSubnet

Revision as of 23:15, 21 April 2012 by Victor (talk | contribs) (Created page with "__NOTOC__ Checks if given IP address is within given subnet (including subnet and broadcast addresses). == Syntax == AddrInSubnet(''address'', ''subnet'', ''mask''); == P...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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