• 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: local host IP address on X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: local host IP address on X


  • Subject: Re: local host IP address on X
  • From: Kevin Parichan <email@hidden>
  • Date: Tue, 16 Jul 2002 23:05:17 -0700

>The problem here is that these standard sockets calls aren't really
>well suited to a dynamic TCP/IP environment. Because Mac OS X has
>lots of code that assumes that these calls do something meaningful,
>they've been hardwired to always return the loopback address. That
>way UNIX programs that assume a single fixed IP address continue to
>limp along.
>
>The best fix is to use the System Configuration framework APIs to
>build an IP address list, and also to be notified when that list
>changes. Alternatively, you can use the get_ifi_info routine (on
>page 434 of Stevens) to get the full list of IP addresses and choose
>amongst them.

The product (a game) actually does have an interface for the user to
select a particular address if the machine has more than one. I'm also
only building one executable, loading routines from frameworks if
necessary. Even though it's overkill, I'm wondering if I should just use
OT in this particular case to build my list? The routines are available
via CFM and since the list is only built once, a performance hit would be
no big deal. The rest of the networking code would remain as-is (i.e.
socket-based).

=kp
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: local host IP address on X
      • From: Allan Nathanson <email@hidden>
  • Prev by Date: Re: CFNetwork crash!
  • Next by Date: Re: local host IP address on X
  • Previous by thread: Re: local host IP address on X
  • Next by thread: Re: local host IP address on X
  • Index(es):
    • Date
    • Thread