Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ifconfig-defaultgateway

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifconfig-defaultgateway - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"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);
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc