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
As you've stated, the Java standard library does not provide a low level enough networking API to send an ARP request.
The pcap4j
provides Java bindings for libpcap / winpcap and thus can be used to send an ARP request. Information on the library can be found on their homepage. See this sample for how to send an ARP request.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With