send echo packets of 56 bytes (all zeroes) - this seems to work better, especially with unusual devices like iBoot, thanks go to Michael Higgs for debugging

This commit is contained in:
Anton Keks 2013-03-10 22:09:46 +02:00
parent 06d440489e
commit e28ed30da0

View File

@ -42,9 +42,10 @@ public class WindowsPinger implements Pinger {
IpAddrByVal ipaddr = new IpAddrByVal();
ipaddr.bytes = subject.getAddress().getAddress();
int sendDataSize = 16;
int replyDataSize = sendDataSize + (new IcmpEchoReply().size());
int sendDataSize = 56;
int replyDataSize = sendDataSize + (new IcmpEchoReply().size()) + 10;
Pointer sendData = new Memory(sendDataSize);
sendData.clear(sendDataSize);
Pointer replyData = new Memory(replyDataSize);
PingResult result = new PingResult(subject.getAddress());