node_pcap
node_pcap copied to clipboard
icmp tracking
hi!
is it possible to send and monitor ping packets with this library?
thx, regards, dz
You can certainly decode them right now, which might sort of helps.
There isn't a good way to send them yet. I'd like to expose pcap_inject()
, but that needs a bit more plumbing.
ok, great - looking forward to it - this would allow for some uptime monitoring
In the meantime, you can generate UDP probes using node's dgram support and watch for the ICMP to come back.
I need to figure out how to do it, but thanks for a hint!
hi, I did what you suggested and it works moreless fine (some hosts don't answer to udp probes and still answer to ping). But when I try to check hosts on an openvpn network (interface tun) I get the following warrning: pcap.js: decode.packet() - Don't yet know how to decode link type Unknown linktype 12
is it something you have plans to implement?
btw. here is the script I am testing it with: http://github.com/danielzzz/node-ping
I've added support for linktype 12.
Bummer about the UDP probes getting filtered. Support for pcap_inject is coming at some point.