Skip to content

Commit

Permalink
Merge pull request #7 from stfnhmplr/master
Browse files Browse the repository at this point in the history
added support for nodejs 10
  • Loading branch information
dresende committed Nov 4, 2019
2 parents 5f4a7c8 + 3152ec9 commit fb5a39f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -2,7 +2,7 @@ const NS_PER_SEC = Math.pow(10, 9);

const os = require("os");
const raw = require("raw-socket");
const pcap = require("pcap2");
const pcap = require("pcap");
const types = require("./types");

exports.ping = (...args) => {
Expand Down Expand Up @@ -147,7 +147,7 @@ function try_ping(ip_address, packet, options, next) {
return next(null, info);
};

let session = new pcap.Session("", { filter : "arp" });
let session = pcap.createSession("", "arp");
let time = process.hrtime();

session.on("packet", (raw) => {
Expand Down
37 changes: 37 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
@@ -1,13 +1,14 @@
{
"name" : "arping",
"version" : "0.1.0",
"version" : "0.1.1",
"description" : "ARP ping using raw sockets",
"main" : "index.js",
"keywords" : [ "arp", "ping" ],
"author" : "Diogo Resende <dresende@thinkdigital.pt>",
"repository" : "git@github.com:dresende/node-arping.git",
"license" : "MIT",
"dependencies" : {
"pcap2" : "^3.0.4"
"pcap" : "^2.1.0",
"raw-socket": "^1.7.0"
}
}

0 comments on commit fb5a39f

Please sign in to comment.