good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If each entry of the set is a nonoverlapping range of IP addresses, i would keep them in a sorted list of ranges.
A given ip address can be found by bisecting on the start of each range followed by a check that the address is smaller or equal to its highest value. If you want to use strings for IP addresses, bitwise string operators may be of help if you need to mask out the subnet with the netmask value for the range. In reply to Re: Storing and searching sets of IP address ranges
by hexcoder
|
|