You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Damir Dezeljin <pr...@mbss.org> on 2003/01/23 15:04:05 UTC

Question about getting IP addresses

Hi.

I create an APR socket and bind it to 0.0.0.0:<port> .

How can I get all the IP addresses on which the socket is listening?

Regards,
Dezo


Re: Question about getting IP addresses

Posted by Jeff Trawick <tr...@attglobal.net>.

Damir Dezeljin wrote:

> Hi.
>
> I create an APR socket and bind it to 0.0.0.0: .
>
> How can I get all the IP addresses on which the socket is listening?

no APR way to do that...  probably no portable way to do that...

on most BSD-like network stacks you can use ioctl(SIOCGIFCONF) to iterate
through the interfaces, then assume that there isn't any funky sys
config that limits the app's bind to a certain interface