You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously hostname and IP were printed together in "host" key:
{"bytes": 64, "host": "www.seznam.cz (77.75.77.222)", "seq": 1,
"ttl": 55, "time": "11.0"}
{"host": "seznam.cz", "transmitted": 1, "received": 1, "duplicates":
0, "corrupted": 0, "errors": 0, "loss": 0, "time": 0, "rtt": {"min":
"11.015", "avg": "11.015", "max": "11.015", "mdev": "0.000"}}
Now output has new array "host", with "arg", "cname" and "ip" keys,
replacing the original "host" key:
{"bytes": 64, "host": {"arg": "seznam.cz", "cname": "www.seznam.cz",
"ip": "77.75.79.222"}, "seq": 1, "ttl": 55, "time": "11.4"}
{"transmitted": 1, "received": 1, "duplicates": 0, "corrupted": 0,
"errors": 0, "loss": 0, "time": 0, "rtt": {"min": "11.384", "avg":
"11.384", "max": "11.384", "mdev": "0.000"}}
* "arg" - original argv[1] parameter (destination).
* "cname" - getaddrinfo() reverse DNS resolution (PTR lookup), NOTE: not
added if empty due calling ping with "-n"
* "ip" - IPv4 or IPv6
That required rewrite handling hostname and reverse IP resolution.
Previously were both hostname and IP address passed to
gather_statistics() in a single string. Now function have both as
separate parameters. That required adding new function set_cname_ip().
Fixes: iputils#609
Signed-off-by: Petr Vorel <pvorel@suse.cz>
0 commit comments