Re: IP address validation
Re: IP address validation
- Subject: Re: IP address validation
- From: Ricky Sharp <email@hidden>
- Date: Sat, 7 Jul 2007 10:40:39 -0500
On Jul 7, 2007, at 9:52 AM, Todd Ransom wrote:
You need to provide some context for "valid." Do you mean it's in a
valid format (dotted quad)? Do you mean it's not a network or
broadcast address? Not a multicast address?
To determine whether or not an address belongs to a particular
subnet (I assume that's what you need) you must also know the
subnet mask.
Don't forget about IPv6 :)
Now then, I haven't played around with this stuff for about 3 years,
but I did some small test apps using the "reachability" APIs
introduced in 10.3 (e.g. SCNetworkReachabilityCreateWithName)
I know I did testing both at home (internet) and at work (intranet).
I agree that the OP needs to provide more info. But, to make a guess...
If a given client will have some address A, and you want to ensure
that A is within a particular network N, you could use the
reachability APIs to prove that A can reach a well-defined address
within N (e.g. corporate intranet website).
Depending upon what APIs will be used in the solution, further
questions may be better to ask on the network-dev list.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden