{"name":"node-macaddress","version":"0.1.2","description":"Get the MAC addresses (hardware addresses) of the hosts network interfaces.","main":"index.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"https://github.com/scravy/node-macaddress.git"},"keywords":["mac","mac-address","hardware-address","network","system"],"author":{"name":"Julian Fleischer"},"license":"MIT","bugs":{"url":"https://github.com/scravy/node-macaddress/issues"},"homepage":"https://github.com/scravy/node-macaddress","dependencies":{"async":"^0.9.0"},"devDependencies":{"gulp":"^3.8.11","gulp-jshint":"^1.9.4"},"gitHead":"729d19634c6eafec3de95b7ad0b549bfa33b6705","_id":"node-macaddress@0.1.2","_shasum":"95c3f600201987637c5ccdf3f9ff0345a698e1e4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"scravy","email":"julian@scravy.de"},"maintainers":[{"name":"scravy","email":"julian@scravy.de"}],"dist":{"shasum":"95c3f600201987637c5ccdf3f9ff0345a698e1e4","tarball":"http://registry-npm.ywwl.com/node-macaddress/download/node-macaddress-0.1.2.tgz","integrity":"sha512-jFMMpx8iDW/QB0xCA+wzMZALbuMbPErWw13BOLmjCh851iUqYHfe+CPgOHLuE61UvNzaCKW81BiFvyRdUWDxmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwDmQ9QSpLkIEpznVQsSNtBwhDgsVBfID6Nqhme4wpkgIhAO8aQsYNlzYXqMPFXMIznGbsqPdRYdeUeUvrYtOPuVSU"}],"size":4178,"noattachment":false,"key":"/node-macaddress/-/node-macaddress-0.1.2.tgz"},"deprecated":"'node-macaddress' was renamed to just 'macaddress', please use that one.","directories":{},"readme":"node-macaddress\n===============\n\n[![Build Status](https://travis-ci.org/scravy/node-macaddress.svg?branch=master)](https://travis-ci.org/scravy/node-macaddress)\n\nRetrieve MAC addresses in Linux, OS X, and Windows.\n\nA common misconception about MAC addresses is that every *host* had *one* MAC address,\nwhile a host may have *multiple* MAC addresses – since *every network interface* may\nhave its own MAC address.\n\nThis library allows to discover the MAC address per network interface and chooses\nan appropriate interface if all you're interested in is *one* MAC address identifying\nthe host system (see `API + Examples` below).\n\n**Features:**\n\n+ works on `Linux`, `Mac OS X`, `Windows`, and on most `UNIX` systems.\n+ `node ≥ 0.12` and `io.js` report MAC addresses in `os.networkInterfaces()`\n  this library utilizes this information when available.\n+ also features a sane replacement for `os.networkInterfaces()`\n  (see `API + Examples` below).\n\nUsage\n-----\n\n```\nnpm install --save node-macaddress\n```\n\n```JavaScript\nvar macaddress = require('node-macaddress');\n```\n\nAPI + Examples\n--------------\n\n    (async)  .one(iface, callback) → string\n    (async)  .one(callback)        → string\n    (async)  .all(callback)        → { iface: { type: address } }\n    (sync)   .networkInterfaces()  → { iface: { type: address } }\n\n---\n\n### `.one([iface], callback)`\n\nRetrieves the MAC address of the given `iface`.\n\nIf `iface` is omitted, this function automatically chooses an\nappropriate device (e.g. `eth0` in Linux, `en0` in OS X, etc.).\n\n**Without `iface` parameter:**\n\n```JavaScript\nmacaddress.one(function (err, mac) {\n  console.log(\"Mac address for this host: %s\", mac);  \n});\n```\n\n```\n→ Mac address for this host: ab:42:de:13:ef:37\n```\n\n**With `iface` parameter:**\n\n```JavaScript\nmacaddress.one('awdl0', function (err, mac) {\n  console.log(\"Mac address for awdl0: %s\", mac);  \n});\n```\n\n```\n→ Mac address for awdl0: ab:cd:ef:34:12:56\n```\n\n---\n\n### `.all(callback)`\n\nRetrieves the MAC addresses for all non-internal interfaces.\n\n```JavaScript\nmacaddress.all(function (err, all) {\n  console.log(JSON.stringify(all, null, 2));\n});\n```\n\n```JavaScript\n{\n  \"en0\": {\n    \"ipv6\": \"fe80::cae0:ebff:fe14:1da9\",\n    \"ipv4\": \"192.168.178.20\",\n    \"mac\": \"ab:42:de:13:ef:37\"\n  },\n  \"awdl0\": {\n    \"ipv6\": \"fe80::58b9:daff:fea9:23a9\",\n    \"mac\": \"ab:cd:ef:34:12:56\"\n  }\n}\n```\n\n---\n\n### `.networkInterfaces()`\n\nA useful replacement of `os.networkInterfaces()`. Reports only non-internal interfaces.\n\n```JavaScript\nconsole.log(JSON.stringify(macaddress.networkInterfaces(), null, 2));\n```\n\n```JavaScript\n{\n  \"en0\": {\n    \"ipv6\": \"fe80::cae0:ebff:fe14:1dab\",\n    \"ipv4\": \"192.168.178.22\"\n  },\n  \"awdl0\": {\n    \"ipv6\": \"fe80::58b9:daff:fea9:23a9\"\n  }\n}\n```\n\n","publish_time":1427941607129,"_cnpm_publish_time":1427941607129,"dist-tags":{"latest":"0.2.4"}}