Re: How to find out the IP(s) of your machine

"Wan-Teh Chang" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
On Fri, Oct 24, 2008 at 2:10 AM, Joachim Ziegler <[email protected]> wrote:
>
> On my Debian GNU/Linux, there is no getifaddrs(), but there is
> getaddrinfo().
>
> This means, to stay portable, I should stick to my complex solution.

There is another workaround that people mentioned in this newsgroup
before.  I seem to remember that workaround calls PR_Bind to bind
a socket to PR_INADDR_ANY and then calls PR_GetSockName to
get the address the socket is actually bound to.  It can only return
one IP address, even if the local host has multiple IP addresses.

Since several people have asked about how to do this, I opened an
enhancement request in Bugzilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=461543

Wan-Teh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.