stealthcopter / AndroidNetworkTools

Set of useful android network tools
Apache License 2.0
1.36k stars 283 forks source link

ping command timeout and ttl arguments error ? #48

Closed asiontang closed 5 years ago

asiontang commented 5 years ago

in the PingNative.java code

runtime.exec(pingCommand + " -c 1 -w " + timeoutSeconds + " -w" + ttl + " " + address);

maybe below is the right code?

-W + timeoutSeconds
-t" + ttl

Device Info:

  1. 天天模拟器 Android 4.4.4
  2. ZUK Z2 Android 7.1.2

Ping command help:

root@hlteuc:/ # ping Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] [-W timeout] [hop1 ...] destination

stealthcopter commented 5 years ago

@asiontang You're completely right, fixing this now! Thanks

stealthcopter commented 5 years ago

Fixed in 0.4.3