Quote:
Originally Posted by kgun
- Is there a unique formulae?
- I am not an expert. A question I have asked myself is if there is an overlap for different countries?
You don't imply by that that it is simple addition (modulo a number)?
So to repeat in other words, you are in a sense looking for least common denominators (like of prime numbers)?
And googling by different KW's does not give relevant hits.
The reason I mentioned the two above sites is that they are experts on IP-related problems, so they may know of such a script. DnsStuff has a forum. Gary Keith may be contacted by a simple question.
|
1.) There is a unique formula. Think of it this way. The database(s) contain the complete listing of every IP address/network in the world. Each assigned network is keyed to a specific country, registrar and also has a unique key identifying the network.
When a request is made for a country or countries, the data is sorted by country first and then IP address. The formula for contiguous network is fairl simple. If country and ending IP range +1 is equal to country and starting IP range, you have a contiguous network.