Difference between revisions of "NXSL:AddrInSubnet"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ Checks if given IP address is within given subnet (including subnet and broadcast addresses). == Syntax == AddrInSubnet(''address'', ''subnet'', ''mask''); == P...")
(No difference)

Revision as of 21:15, 21 April 2012

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