[usocket-devel] Determining the local host address from wildcard host
Hans Hübner
hans.huebner at gmail.com
Sun Mar 7 06:44:10 UTC 2010
Elliott,
to my knowledge, usocket does not provide an API to get a list of all
network interfaces, which is what you need to do if you want to know
the local IP address(es).
One quick workaround is to invoke ifconfig and parse the output. I
know that this is not a very satisfying or portable approach, but it
is quick.
-Hans
On Sun, Mar 7, 2010 at 07:20, Elliott Slaughter
<elliottslaughter at gmail.com> wrote:
> Hi,
> I'm wondering if there is any way to determine the local host address (or
> addresses) used when I create a socket with :local-host *wildcard-host* .
> When I try to call get-local-address on such a socket, I just get #(0 0 0
> 0).
> Thanks.
>
> --
> Elliott Slaughter
>
> "Don't worry about what anybody else is going to do. The best way to predict
> the future is to invent it." - Alan Kay
>
> _______________________________________________
> usocket-devel mailing list
> usocket-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
>
>
More information about the usocket-devel
mailing list