IP Subnetting under CF.NET

  • Thread starter Thread starter Jared Miniman
  • Start date Start date
J

Jared Miniman

Does there exist code out there that inputs both an IP address (of a
handheld, for example) and a subnet address and returns a network IP
address? Several freeware applications do it, but I want to build this
functionality into my CF application....

Thanks for any tips!
 
No, I don't recall seeing one, but it's a simple masking operation:

172.16.12.1
255.255.0.0
=
172.16.0.0

So, if you convert each piece of the IP and subnet mask to a byte and do an
AND operation on them, you'll get the result, a byte at a time.

Paul T.
 
Back
Top