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