inet:getiflist() behaviour in Windows

Mark Scandariato mfs@REDACTED
Wed Aug 10 19:33:45 CEST 2005


This is from winxp sp2 (bleh) with one interface, where the correct IP address is 157.198.238.176:

Erlang (BEAM) emulator version 5.4.8 [threads:0]

Eshell V5.4.8  (abort with ^G)
1> {ok, L} = inet:getiflist().
{ok,["671.832.891.751","100.0.0.721"]}
2> [lists:reverse(I) || I <- L].
["157.198.238.176","127.0.0.001"]
3>


YMMV.

-----Original Message-----
From: Nicolas Niclausse <nicolas@REDACTED>
Sent: Aug 10, 2005 12:48 PM
To: erlang-questions@REDACTED
Subject: Re: inet:getiflist() behaviour in Windows

Stephen Han ecrivait le 04.08.2005 23:34:
> Hi
> 
> This is what I did in Linux (gentoo with kernel 2.6.10)
> 
> 2> inet:getiflist().
> {ok,["lo","eth0"]}

this function doesn't seem to handle alias interfaces (at least on linux)

Eshell V5.4.8  (abort with ^G)
 >inet:getiflist().
{ok,["lo",[],[2],[],"eth1",[]]}

I have 4 interfaces: eth0, eth0:0, eth0:1 and eth1

-- 
Nicolas






More information about the erlang-questions mailing list