arp-find-ip
arp-find-ip ==================
Last updated 2 years ago by pogui .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install arp-find-ip 
SYNC missed versions from official npm registry.

arp-find-ip

Sometimes you need to consume a service from a local network segment host, but, you can't/ won't avoid the DHCP server to change default IP leasing mechanism.

Use arp-find-ip to populate your ARP table and ask for your 'well known' host MAC's actual leased IP.

Install

npm install -g arp-find-ip

Usage

var util = require('util');
var ARP = require('../lib/arp-find-ip');

var arp = new ARP();
arp.discover();

arp.on('error', function (err) {
    console.log(err);
});

// Discovery (AKA arp-scan) :
arp.on('success', function (res) {
    if (!res) {
        console.log('!res');
        return;
    }
    // Search for a particular MAC's ip :
    console.log(arp.getIP('00:40:ad:9e:a4:eb'));
});

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |