Re: IP address validation
Re: IP address validation
- Subject: Re: IP address validation
- From: Todd Ransom <email@hidden>
- Date: Sat, 7 Jul 2007 10:52:56 -0400
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.
Todd Ransom
Return Self Software
http://returnself.com
On Jul 5, 2007, at 11:46 AM, Scott Anguish wrote:
On Jul 5, 2007, at 5:03 AM, Saritha A wrote:
Hi all,
I want to check validity of IPAddress i.e., i want to check
whether the IPAddress is valid or not and also whether the given
IP belongs to a particular network or not. Are there any classes
in cocoa for this to be done. Please help me to do this. Thanks in
advance
I think these are two separate issues.
the first, assuming you mean you want to ensure that J. Q. User
entered the IP address correctly (there are 4 numbers, and that
each of those numbers are dot separated, and within legal ranges..)
you'd need to write an NSFormatter for this.
as to whether it belongs to a particular network or not, it isn't
clear what exactly you mean by this.
_______________________________________________
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
_______________________________________________
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