• 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: Dustin Voss <email@hidden>
  • Date: Wed, 21 Jul 2004 10:36:03 -0700

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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Getting IP Address
      • From: Jamie <email@hidden>
    • Re: Getting IP Address
      • From: Scott Thompson <email@hidden>
References: 
 >Getting IP Address (From: "David Cornell" <email@hidden>)

  • Prev by Date: Re: Global Floating Windows?
  • Next by Date: Re: Global Floating Windows?
  • Previous by thread: Re: Getting IP Address
  • Next by thread: Re: Getting IP Address
  • Index(es):
    • Date
    • Thread