I made a basic program in java using Jpcap to ping a machine. However the problem is whenever I ping using Win 7 command prompt, it returns a ping reply. However using Jpcap, it doesn't send a reply to my ping request. However I came across a strange situation. On the other machine, which I am pinging, If I open a Wireshark console and monitor the packets, it shows a ICMP request and sends a reply then. However this is not working again if I close the wireshark !!
What is the problem here ?? Is it with some Win 7 firewall or some other issues ?
I have attached the code below :
asked 24 Aug ‘12, 02:58
This question is not really related to Wireshark. I suggest:
IF this happens on the client (where your Jpcap code runs), I guess that you just loaded the WinPcap driver when you started Wireshark and that's the reason why it then works. In that case it's a WinPcap issue and you need to figure out why the Winpcap driver is not running per default.
You should also add some error detection code, to detect these kind of situations, when Jpcap is not able to receive/send packets.
answered 24 Aug '12, 04:13
Kurt Knochner ♦
edited 24 Aug '12, 04:24