• 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: cleanest way to get outside IP address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cleanest way to get outside IP address


  • Subject: Re: cleanest way to get outside IP address
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 8 Jan 2009 13:19:16 -0800


On Jan 8, 2009, at 11:52 AM, Nicolas Berloquin wrote:

I'm looking for the cleanest or prefered way to get the "outside" IP adress of a host on a network,
from the said host. For example a mac behind a NAT router.

The new-in-10.5 NAT-traversal API in <dns_sd.h> supports this. Search the header for "portmapping". The restrictions are:
* 10.5 or later
* Router must support UPNP or NAT-PMP (most do).
* Only looks at one NAT, so doesn't support double-NAT situations (which happen with certain ISPs.)
* The only documentation is some comments in the header file.


I have some code that wraps an Objective-C API around this, but it's not handy right now; I could dig it up later, if you'd like.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >cleanest way to get outside IP address (From: Nicolas Berloquin <email@hidden>)

  • Prev by Date: Re: cleanest way to get outside IP address
  • Next by Date: Re: cleanest way to get outside IP address
  • Previous by thread: Re: cleanest way to get outside IP address
  • Next by thread: Re: cleanest way to get outside IP address
  • Index(es):
    • Date
    • Thread