<pr*********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
i am sorry, i have an application which will take the ipv6 address as
input from the user. I just want to know if the user enters the proper
ipv6 address or not. I am validating this for ipv4 and now i want to do
the same for ipv6 address. Thanks for the time
Okay, so how are you validating them for ipv4? Are you ensuring that they
point to a valid machine or not? Are you checking to see what type of
address it is (broadcast with last byte being 255, the other special case
with the last being 0)? Are you checking to see if it's Class A, Class B,
Class C? Are you checking to see if it's withing your network? Are you
checking to see if they aren't in the local ip ranges? (192.168.x.x, etc..).
Are you checking to make sure they don't point to NSA servers?
A simple validation would be to see if you get 6 bytes between 0 and 255.
A more complex validation would be to ensure they aren't broadcast or 0
terminated.
A more complex validation would attempt to ping the address and see if you
get a reply.
A more complex validation would have all known valid IP addresses in a
lookup table and only ping those you don't know as valid, and update the
table if they are.
So, again, what is your definition of valid?