Is there a way to send ARP request via Java?

beyonddc picture beyonddc · Feb 1, 2013 · Viewed 12.6k times · Source

Is there a way to send ARP request within a Java application? I know that ARP is sitting a layer under TCP and UDP therefore by default Java couldn't send ARP request. I am just wondering is there any 3rd party Java library that will allow you to send ARP request.

To capture ARP reply, I know I can use jpcap so that part is solved.

Thanks

Answer

eis picture eis · Feb 1, 2013

A java app can always execute some external command, calling another tool to do it. I'm not sure what you mean by "standard java" though.

Based on googling, there seems to be arping in kraken pcap which is in Java. See about Kraken.

There's also jpcap as well that's used for the purpose.