Re: Forcing IPv4
Re: Forcing IPv4
- Subject: Re: Forcing IPv4
- From: Chris Ridd <email@hidden>
- Date: Tue, 01 Feb 2005 09:00:32 +0000
On 1/2/05 5:58 am, Chris Giddings <email@hidden> wrote:
> Hello,
>
> I am using this code to retrieve the ip of the current computer. Does
> anyone know of a way to force IPv4 without requiring the system to have
> IPv6 turned off? I haven't been able to find a way to do this. I'm
> not very good with the IOKit, and have been having issues attempting to
> grasp it with my current project.
Machines have multiple IPv4 and IPv6 addresses. You should probably try not
to discriminate against (say) any IPv6 addresses, because what you're doing
will break sooner or later. (Or annoy someone using IPv6.)
The BSD call getifaddrs() will return a list of interfaces with their
addresses. It has a man page.
Cheers,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden