• 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: Getting IP Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting IP Address


  • Subject: Re: Getting IP Address
  • From: Jamie <email@hidden>
  • Date: Thu, 22 Jul 2004 08:35:10 +0100

On 21 Jul 2004, at 18:36, Dustin Voss wrote:

On 20 Jul, 2004, at 10:07 PM, David Cornell wrote:

Hey, total newb here...

How do I get the dotted ip address of the currenthost, I'm currently using
NSHost but I get fe80::1. I need to get the real IP, such as 192.168.100.12
etc.

thanks in advance!
dave

Computers can have more than one address, even more than one IPv4 address, if for example they have two network cards or VPN or maybe both AirPort and Ethernet active.

If the user needs to make a choice, you can list user-visible address names like "Built-In Ethernet" through the System Configuration Framework. Apple's MoreIsBetter MoreSCF code, particularly MoreSCCopyUserVisibleNameOfService(), should help with that.

It looks like the System Configuration Framework is difficult to understand. Hopefully, there's an easier way.

There is - I recently have been looking at using the System Configuration framework and frankly it sucks. However you might do a search on ncutil from Jeffrey Frey. It's a network configuration utility that uses a high level framework he built for doing all these kinds of operations. It's very useful.

Jamie

_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Getting IP Address (From: "David Cornell" <email@hidden>)
 >Re: Getting IP Address (From: Dustin Voss <email@hidden>)

  • Prev by Date: Re: How to disable Apple's Bug Report Dialog when application crash?
  • Next by Date: How to program the help button?
  • Previous by thread: Re: Getting IP Address
  • Next by thread: Video Card model name?
  • Index(es):
    • Date
    • Thread