https://github.com/dresende/node-arping
NodeJS ARP ping using raw sockets
https://github.com/dresende/node-arping
Last synced: 10 months ago
JSON representation
NodeJS ARP ping using raw sockets
- Host: GitHub
- URL: https://github.com/dresende/node-arping
- Owner: dresende
- Created: 2017-08-22T18:19:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T11:13:58.000Z (about 6 years ago)
- Last Synced: 2025-03-18T17:24:46.059Z (10 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## NodeJS ARP Request (ping)
This module allows you to send an ARP request and catch the response. In the response you'll get
the hardware address of the target and the round trip time.
### Install
```sh
npm i arping
```
### Usage
```js
const arp = require("arping");
arp.ping("192.168.0.1", (err, info) => {
if (err) throw err; // Timeout, ...
// THA = target hardware address
// TIP = target IP address
console.log("%s (%s) responded in %s secs", info.tha, info.tip, info.elapsed);
});
```