Hay un poco de "morralla" porque lo estoy usando dentro de un programa, pero esto te debería servir:
Código Delphi
[-]
procedure TPingThread.Execute;
var
rp:TReplyStatus;
begin
Self.IdIcmp := TIdIcmpClient.Create(nil);
try
Self.IdIcmp.Host := Self.FIPServer;
Self.IdIcmp.ReceiveTimeout := 2000;
IdIcmp.OnReply := PingReply;
ini := Now;
try
IdIcmp.Ping;
except
on E:EIdSocketError do begin
rp := TReplyStatus.Create;
rp.FromIpAddress := '0.0.0.0';
rp.ToIpAddress := '0.0.0.0';
rp.ReplyStatusType := rsError;
rp.Msg := E.Message;
PingReply(IdIcmp, rp);
end;
end;
finally
FreeAndNil(Self.IdIcmp);
end;
end;
En PingReply o en el evento OnReply tienes los datos de la respuesta, tal y como te han dicho.