I\'m looking to obtain my own IP address in order to publish that information in to a Peer-to-Peer network. In POSIX/C we have getaddrinfo(NULL, ...)
, but this
I'm not trying to make things more complicated though I should point out that a single computer can have several IP addresses. typically each network card will have one.
a more specific way to ask would be "how do I find the IP address that will be used as the source address when I connect to foo.com.org" I like bortzmeyer's answer for this :)