• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IP address validation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: IP address validation
      • From: Ricky Sharp <email@hidden>
References: 
 >IP address validation (From: Saritha A <email@hidden>)
 >Re: IP address validation (From: Scott Anguish <email@hidden>)

  • Prev by Date: [coredata] populate NSPopupButton with NSAttributedStrings
  • Next by Date: Re: [coredata] populate NSPopupButton with NSAttributedStrings
  • Previous by thread: Re: IP address validation
  • Next by thread: Re: IP address validation
  • Index(es):
    • Date
    • Thread