ifconfig-defaultgateway
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "ifconfig-defaultgateway", | ||
"description": "ifconfig-defaultgateway is a node.js library to parse ifconfig and get the default gateaway on a linux machine", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Sam Decrock", |
# ifconfig-defaultgateway | ||
Node.js module to call and parse 'ifconfig' and use 'route' to find default gateway. | ||
ifconfig-defaultgateway is a node.js library to parse ifconfig and get the default gateaway on a linux machine. | ||
Currently only tested on Debian (Raspberry Pi) | ||
Currently only tested on Debian (Raspberry Pi) | ||
## Install | ||
You can install __ifconfig-defaultgateway__ using the Node Package Manager (npm): | ||
npm install ifconfig-defaultgateway | ||
## Examples | ||
```js | ||
var network = require('ifconfig-defaultgateway'); | ||
network.ifconfig(function (err, interfaces) { | ||
if(err) return console.log(err); | ||
console.log('\nIFCONFIG INTERFACES:\n', interfaces); | ||
}); | ||
network.route(function (err, routes) { | ||
if(err) return console.log(err); | ||
console.log('\nROUTE ROUTES:\n', routes); | ||
}); | ||
network.getNetworkInfo(function (err, interfaces) { | ||
if(err) return console.log(err); | ||
console.log('\nNETWORK INFO INTERFACES (WITH DEFAULT GATEWAY):\n', interfaces); | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10906
32