Have a new class "IPBlock" that can be defined either as a range, a vector of IP's, or combination*s* of both (and support v4 and v6):
IPBlock::addIP(IPAddress ip)
IPBlock::removeIP(ip)
IPBlock::addNetwork(ip, (bit)mask)
IPBlock::addRange(ip_start, ip_end)
IPBlock::removeRange(ip_start, ip_end)
For a quick use, have two possible constructors: one that takes an IP and a mask; one that takes two ip's to form a range.
And one would be able to see if an IP is in that block with IPBlock::contains(ip)
or perhaps also if another block is contained: IPBlock::contains(IPBlock block)
Also, how come ipv6 masks aren't supported?





