Skip to content

givenergy-modbus / parseSubnet

Function: parseSubnet() ​

parseSubnet(cidr): string[]

Defined in: src/discover.ts:25

Parse a CIDR notation subnet into a list of host IP addresses. Excludes network address (first) and broadcast address (last) for /24 and smaller.

Parameters ​

cidr ​

string

e.g. '192.168.1.0/24' or '192.168.1.50/32'

Returns ​

string[]