|
-
Aug 17th, 2017, 02:33 PM
#8
Re: multiple range checking algorithm vb6
 Originally Posted by axisdj
Hello,
Working on a new project that needs to identify ony USA based IP addesses.
I have a list of USA based IP's which I will convert to ranges of Longs.. example (3.0.0.0 - 3.255.255.255 = 218103808 - 22229811)
So I will place this list into memory somehow.
Would like suggestions on how best to find when in ip is in range from a list of about 7000 ranges?
thanks
I'm not quite clear as to how this translates into this, which BTW, equals 195,873,997.
Be that as it may, would it help to deal with the 4 "parts" individually?
ie ..
3 to 3
0 to 255
0 to 255
0 to 255
EDIT-1:
For example .. "to be checked" IP is 004.011.212.003
Your list of 7,000 has:
003.001.001.002 .. 1st in list
:
003.101.201.004
:
003.255.000.255 .. last in list
You'd know at "pass 1" that there is no 004 as the 1st "part", so, you're done
Please correct me if I've missed the (ahem) point.
Spoo
Last edited by Spooman; Aug 17th, 2017 at 02:46 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|