compare IP address against a range.

I have a list of IP addresses and subnet masks

I need to compare an incoming client IP address and see if it lies within the ranges that I have stored in my list.

How can I do this??


Thanks
If u have IP in the form 123.456.789 u can parse it into 3 parts and compare each of those ranges.
For example if the first range '123' is not within ur list then the other 2 will be invalid.
If the first is in the range but the 2nd one isn't, then the last range is invalid to check...
Last edited on
Topic archived. No new replies allowed.