From e28ed30da054139c246cc918636ac2b5efc1ef0f Mon Sep 17 00:00:00 2001 From: Anton Keks Date: Sun, 10 Mar 2013 22:09:46 +0200 Subject: [PATCH] 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 --- src/net/azib/ipscan/core/net/WindowsPinger.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/azib/ipscan/core/net/WindowsPinger.java b/src/net/azib/ipscan/core/net/WindowsPinger.java index 2085071b..1f5bc98c 100644 --- a/src/net/azib/ipscan/core/net/WindowsPinger.java +++ b/src/net/azib/ipscan/core/net/WindowsPinger.java @@ -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());