• 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: Forcing IPv4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: + initialize docs conflict?
  • Next by Date: Re: Using custom framework
  • Previous by thread: Re: + initialize docs conflict?
  • Next by thread: Re: Using custom framework
  • Index(es):
    • Date
    • Thread