public ICMPSharedPinger(int timeout) throws IOException {
// we use two shared sockets, because it works more efficiently
// OSs tend to copy all received ICMP packets to all open raw sockets,
// so it is very bad to have a separate raw socket for each scanning thread
sendingSocket = new RawSocket();
sendingSocket.open(RawSocket.PF_INET, IPPacket.PROTOCOL_ICMP);
receivingSocket = new RawSocket();
receivingSocket.open(RawSocket.PF_INET, IPPacket.PROTOCOL_ICMP);
this.timeout = timeout;
try {
sendingSocket.setSendTimeout(timeout);