#
03d4d1c7 |
| 21-Nov-2022 |
Jose Luis Duran <jlduran@gmail.com> |
ping: Unify ping/ping6 statistics section
This is a first step towards a unification/simplification of ping/ping6 (internally). The end goal is to produce a standardized user-facing output.
Before
ping: Unify ping/ping6 statistics section
This is a first step towards a unification/simplification of ping/ping6 (internally). The end goal is to produce a standardized user-facing output.
Before (ping6):
PING6(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.168 ms 16 bytes from ::1, icmp_seq=1 hlim=64 time=0.068 ms
--- 2001:db8::2 ping6 statistics --- round-trip min/avg/max/std-dev = 0.068/0.118/0.168/0.050 ms
After (ping6):
PING(56=40+8+8 bytes) 2001:db8::1 --> 2001:db8::2 16 bytes from ::1, icmp_seq=0 hlim=64 time=0.168 ms 16 bytes from ::1, icmp_seq=1 hlim=64 time=0.068 ms
--- 2001:db8::2 ping statistics --- round-trip min/avg/max/stddev = 0.068/0.118/0.168/0.050 ms
This has the nice side-effect of adding units to SIGINFO's statistics, as printing numbers without units may not be of much help. Also mentions the fact that these times are round-trip.
Before (ping/ping6 SIGINFO):
2/2 packets received (100.0%) 0.068 min / 0.118 avg / 0.168 max
After (ping/ping6 SIGINFO):
--- <ipv4/ipv6 address> ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.068/0.118/0.168/0.050 ms
In the case of a SIGINFO, the output will be printed to stderr, for both ping and ping6.
Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/863 Differential Revision: https://reviews.freebsd.org/D39126
show more ...
|
#
5af718a5 |
| 20-May-2022 |
Mike Karels <karels@FreeBSD.org> |
ping: if -S srcaddr uses a numeric address, use that protocol
The command "ping -S dotted.quad hostname" fails on dual-stack hosts with the confusing message "ping: invalid source address: Name does
ping: if -S srcaddr uses a numeric address, use that protocol
The command "ping -S dotted.quad hostname" fails on dual-stack hosts with the confusing message "ping: invalid source address: Name does not resolve" because IPv6 is selected in preference. If the argument to -S is numeric (likely), select the corresponding address family, as if -4 or -6 was specified. Add tests that either IPv4 or IPv6 can be forced via a -S parameter.
Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D35271 MFC after: 1 week
show more ...
|