BourgeoisBear / range2cidr

De-aggregates an IP address range into a list of network prefixes (CIDR blocks)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

range2cidr

De-aggregates an IP address range into a list of network prefixes (CIDR blocks)

GoDoc

Returns a list of prefixes (CIDR blocks) that covers the given IP range.

For example, if:

ipLo = 23.128.1.0
ipHi = 23.128.7.255

then Deaggregate(ipLo, ipHi) will return:

23.128.1.0/24
23.128.2.0/23
23.128.4.0/22

About

De-aggregates an IP address range into a list of network prefixes (CIDR blocks)

License:MIT License


Languages

Language:Go 100.0%