joyent/node — Issue #2619: networkInterfaces() doesn't list all NICs on OSX
Author: tomas
Created: 2012-01-26 19:54:00+00:00
State: open

Hey guys,

For some reason I'm not getting all NICs listed by os.networkInfaces() on an Macbook running Lion. ifconfig correctly shows en0 and en1 (Ethernet and Airport), but the os module does not. Both interfaces are active.

``` js

> process.version;
'v0.6.8'
> var os = require('os');
undefined
> os.networkInterfaces();
{ lo0:
[ { address: 'fe80::1',
family: 'IPv6',
internal: true },
{ address: '127.0.0.1',
family: 'IPv4',
internal: true },
{ address: '::1',
family: 'IPv6',
internal: true } ],
en1:
[ { address: 'fe80::6ab8:6dff:fe22:dc9e',
family: 'IPv6',
internal: false },
{ address: '172.16.7.191',
family: 'IPv4',
internal: false } ] }
>
```

Anybody know the reason why?