• 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: NSHost and the IP addresses ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSHost and the IP addresses ...


  • Subject: Re: NSHost and the IP addresses ...
  • From: Peter Sichel <email@hidden>
  • Date: Thu, 27 Jun 2002 13:43:56 -0400

At 1:28 PM +0200 6/27/02, Malte Tancred wrote:
On thursday, june 27, 2002, at 12:51 , Guido Neitzer wrote:
I found a way to get all IP addresses of all interfaces (SystemConfiguration-Framework)... but now I have another problem: Which one is the one to use?

You said you needed the local address to create a port command for an ftp client. Why not ask the control socket (I suppose you have one?) for it's local name?

Check out getsockname().

This is the correct solution. In a multihomed environment,
only the connected socket knows the correct local protocol address
for the corresponding connection. Anything that doesn't ultimately
get the local address from the connected socket is broken.

- Peter
_______________________________________________
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.

References: 
 >Re: NSHost and the IP addresses ... (From: Malte Tancred <email@hidden>)

  • Prev by Date: Re: What's STILL wrong with "symbol" fonts?
  • Next by Date: Re: What's STILL wrong with "symbol" fonts?
  • Previous by thread: Re: NSHost and the IP addresses ...
  • Next by thread: Re: NSHost and the IP addresses ...
  • Index(es):
    • Date
    • Thread