-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cli options "3" - do not round up the RTT time. #540
base: master
Are you sure you want to change the base?
Conversation
Simple question: why do you need it? I see your There are formal things which would need to be fixed (no new README file, fixing formatting - wrong indent, missing a real explanation for the reason), but the main question is whether it's really needed to be included. |
ping/ping_common.c
Outdated
@@ -83,6 +83,8 @@ void usage(void) | |||
" -V print version and exit\n" | |||
" -w <deadline> reply wait <deadline> in seconds\n" | |||
" -W <timeout> time to wait for response\n" | |||
"\nRRI options (Huawei):\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What RRI
means? Why do you mention Huawei? And I would put this to among other options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is to have the -A and -3 options in the same binary to see the actual RTT deviation on the interface.
Please stash the changes to a single commit ( |
ping/ping.c
Outdated
@@ -337,6 +337,7 @@ main(int argc, char **argv) | |||
.source6.sin6_family = AF_INET6, | |||
.ni.query = -1, | |||
.ni.subject_type = -1, | |||
.rtt_precision = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has wrong indent, please fix it (and other wrong indents).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liboabo I'd like to know why you you need that precise option.
@iputils/maintainers FYI this feature LGTM, but I'd like to know your opinion.
In original version ping, when the delay is >= 100ms the resulting time is rounded for milliseconds.
$ ping -c3 192.168.56.102
PING 192.168.56.102 (192.168.56.102) 56(84) bytes of data.
64 bytes from 192.168.56.102: icmp_seq=1 ttl=64 time=81.0 ms
64 bytes from 192.168.56.102: icmp_seq=2 ttl=64 time=130 ms
64 bytes from 192.168.56.102: icmp_seq=3 ttl=64 time=81.4 ms
To avoid this added new command line option "-3".
$ ping -c3 -3 192.168.56.102
PING 192.168.56.102 (192.168.56.102) 56(84) bytes of data.
64 bytes from 192.168.56.102: icmp_seq=1 ttl=64 time=138.515 ms
64 bytes from 192.168.56.102: icmp_seq=2 ttl=64 time=101.676 ms
64 bytes from 192.168.56.102: icmp_seq=3 ttl=64 time=107.434 ms