Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

networkInterfaces() doesn't list all NICs on OSX #2619

Closed
tomas opened this issue Jan 26, 2012 · 2 comments
Closed

networkInterfaces() doesn't list all NICs on OSX #2619

tomas opened this issue Jan 26, 2012 · 2 comments

Comments

@tomas
Copy link

tomas commented Jan 26, 2012

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.

> 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?

@iapain
Copy link

iapain commented Jul 7, 2012

I could not repeat this problem on Lion with node 0.8.1. os.networkInterfaces() have shown me correct list of network interfaces. Are you sure problem still persists on latest stable build of node?

@tomas
Copy link
Author

tomas commented Jul 8, 2012

Yep, looks like it was fixed. Just tested on 0.8.1 and both en0 and en1 are shown. Closing!

@tomas tomas closed this as completed Jul 8, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants