[erlang-questions] Finding IP addresses in a PC

David Hopwood <>
Tue Oct 3 22:15:00 CEST 2006

Jordan Wilberding wrote:
> On my computer it returns:
> {ok,["lo","eth0"]}
> But anyways, the strings are just in reverse, so do this:
>  lists:map(fun(X) -> lists:reverse(X) end, List)
> where List is ["51.0.861.291",""] in your case.

That would produce the wrong result ( instead of

Has anyone tried to investigate this strange bug? I've written C code
to get the interface list on Windows, using GetAdaptorsInfo, and that
function seemed to do precisely what the MSDN documentation said it
should do.

David Hopwood <>

More information about the erlang-questions mailing list