inet:getiflist() behaviour in Windows

Stephen Han kruegger@REDACTED
Mon Aug 8 19:03:26 CEST 2005


In my Windows XP, the netstat -r shows that "0x1" as loopback
interface and "0x2" as ethernet.

However, if I do inet:ifget("0x1", [addr, flags]), returns {error, einval}.

Maybe the way of unix implementation and the windows are different.

I have a feeling that I should not use the undocumented function even
if it is exported publically.

regards

On 8/7/05, Per Hedeland <hedeland@REDACTED> wrote:
> Stephen Han <kruegger@REDACTED> wrote:
> >
> >This is what I did in Linux (gentoo with kernel 2.6.10)
> >
> >2> inet:getiflist().
> >{ok,["lo","eth0"]}
> 
> As expected.
> 
> >And this what I did in Windows XP
> >
> >5> inet:getiflist().
> >{ok,["240.802.170.641","100.0.0.721"]}
> 
> Totally useless.
> 
> >Both of them running R10B-6.
> >
> >Is this work as designed or not?
> 
> I don't know about "designed", but looking at e.g. the useless output of
> "netstat -r" on Windows, it's what I would expect.
> 
> Windows gurus, do interfaces in Windows actually have names, that can be
> used for something (programmatically)? And if so, why are interfaces
> "named" by their IP address?
> 
> --Per Hedeland
>



More information about the erlang-questions mailing list