Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Jun : Calculate/validate the IP address in a subnet

www.cryer.info
Managed Newsgroup Archive

Calculate/validate the IP address in a subnet

Subject:Calculate/validate the IP address in a subnet
Posted by:"henry" (n..@il.please)
Date:Sun, 4 Jun 2006 13:30:26

Hi

I need to validate an IP address of a Client PC and open some web page and
present some data from a SQL server depending on the subnet the IP address
is within.

e.g.

subnetmask = 255.255.255.240

192.168.1.17 is part of the subnet 192.168.1.16 to 192.168.1.31 - then I
will fetch data for the subnet 192.168.1.16

192.168.1.82 is part of the subnet 192.168.1.80 to 192.168.1.95 - then I
will fetch data for the subnet 192.168.1.80

so the result I need from a function is resp. 192.168.1.16 and 192.168.1.80

any suggestions?

cheers Henry

Replies:

www.cryer.info
Managed Newsgroup Archive