displays network interface info including hardware mac addresses for versions of node < 0.12
npm install interfaces
This plugin will hold me over until v0.12 is released and stable -- and adds needed functionality for those can't or wont update
* Produces output similar to os.networkInterfaces(), but with an added MAC address per interface
* os.networkInterfaces() was changed in master and will be first released in v0.12 to include this functionality See #6686
* lib/utils.js also includes a synchronous execute that has been added master and will be released in v0.12 See Changeset
* I've tried to keep the output and usage as close as I can to what is in master -- so you should /knockonwood/ just be able to switch your call when you update
``javascript
var interfaces = require('interfaces');
console.log(interfaces());
````
$ node test.js
{ lo0:
[ { address: '::1',
family: 'IPv6',
internal: true,
mac: '00:00:00:00:00:00' },
{ address: '127.0.0.1',
family: 'IPv4',
internal: true,
mac: '00:00:00:00:00:00' },
{ address: 'fe80::1',
family: 'IPv6',
internal: true,
mac: '00:00:00:00:00:00' } ],
en0:
[ { address: 'fe80::baf6:b1ff:fe1c:2e07',
family: 'IPv6',
internal: false,
mac: 'b8:f6:b1:1c:2e:07' },
{ address: '10.0.1.7',
family: 'IPv4',
internal: false,
mac: 'b8:f6:b1:1c:2e:07' } ] }