Re: Getting IP Address
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.