neighbour

1.0.1 • Public • Published

What

Get the IPv4 neighbour table (also known as the ARP table) and display as json as shown below.

[
  {
    "ip": "192.168.188.1",
    "interface": "wlp3s0",
    "mac": "74:f8:db:64:ca:a1",
    "state": "REACHABLE"
  }
]

Usage

// load module
let neigh = require("neighbour");

//async/await pattern
(async () => {
  let table = await neigh();
  console.log(table);
})();

//Or then/catch pattern
neigh()
  .then((table) => {
    console.log(table);
  })
  .catch(console.error);

Package Sidebar

Install

npm i neighbour

Weekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

2.47 kB

Total Files

4

Last publish

Collaborators

  • nguru