How to ICMPs and traceroutes in Java

前端 未结 2 2046
甜味超标
甜味超标 2020-12-10 16:38

Java does not have primitives for ICMPs and traceroute. How to overcome this? Basically I\'m building code that should run in *nix and Windows, and need a piece of code that

2条回答
  •  渐次进展
    2020-12-10 17:00

    You'll need the jpcap library (maybe the SourceForge jpcap is working too) and use the ICMPPacket class to implement the desired functionality.

    Here is the Java traceroute implementation using the jpcap library .

提交回复
热议问题