Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.
/ arp-a-x-2 Public archive
forked from stickpin/node-arp-a-x

Modernized version of the arp-a-x package

License

Notifications You must be signed in to change notification settings

qwtel/arp-a-x-2

 
 

Repository files navigation

arp-a-x-2

DEPRECATION WARNING: I've originally used this package to avoid assinging static IPs in a local network. This turned out to be an unreliable and unworkable solution. As a result, this package is now archived.

ARP All Cross (X) Platform Version 2

Modernized version of the arp-a-x package.

Like the original uses native implementation when possible. Returns promises and provides JSDoc types for VSCode and TypeScript integration.

Note that the API has changed and is not backwards compatible!

Install

npm install -g --unsafe-perm arp-a-x-2

Usage

const { arpTable, ipLookupMap, macLookup } = require('arp-a-x-2');

(async () => {
  // Get the entire ARP table
  console.log(await arpTable());

  // ES6 Map from IP addresses to devices (see type signature)
  console.log(await ipLookupMap());

  // Can also find a device based by its MAC address (case-insensitive)
  console.log(await macLookup('xx:xx:xx:xx:xx:xx'));
})();

Packages

No packages published

Languages

  • JavaScript 60.0%
  • C++ 34.8%
  • Python 5.2%