Skip to content

traceroute implementation in node using raw-socket to get coords of received IP

License

Notifications You must be signed in to change notification settings

chandrajob365/node-ICMPTraceroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-ICMPTraceroute

NPM

Node.js wrapper around traceroute process to get coordinates of received hops

Install

npm install --save node-icmp-traceroute

Usage Example

const ping = require('../traceroute')

ping.createSession().traceRoute('google.com', (err, data) => {
  if (err) {
    if (err.name === 'DNSError') console.log('err = ', err.message)
  } else {
    console.log('[Inside app] data.latitude = ', data.latitude,
    ' data.longitude = ', data.longitude,
    ' data.source = ', data.source,
    ' data.target = ', data.target,
    ' status = ', data.status)
  }
})

Possible enhancements

  • Support for IP address as input to traceroute
  • IPv6 support

About

traceroute implementation in node using raw-socket to get coords of received IP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published