Improve -d and -n documentation

* Adjust `fping.pod` entries for `-d, --rdns` and `-n, --name`:

  * The code performs reverse DNS lookups on the given targets,
    not on source addresses from ICMP Echo Responses or ICMP
    error messages.  Adjust the `-d` description to reflect this.

  * The sentence describing `-n` seems incomplete, so provide a
    completion in similar spirit to `-d`.

* Add `-d, --rdns` to `-h, --help` output since `-d` and `-n` are
  no longer equivalent.
pull/240/head
Erik Auerswald 3 years ago
parent 477e6776ce
commit 1452bf362e

@ -81,7 +81,7 @@ C<-> indicating that no response was received to the fourth request.
=item B<-d>, B<--rdns>
Use DNS to lookup address of return ping packet. This allows you to give fping
Use DNS to lookup address of ping target. This allows you to give fping
a list of IP addresses as input and print hostnames in the output. This is similar
to option B<-n>/B<--name>, but will force a reverse-DNS lookup even if you give
hostnames as target (NAME->IP->NAME).
@ -150,7 +150,7 @@ Set the "Don't Fragment" bit in the IP header (used to determine/test the MTU).
=item B<-n>, B<--name>
If targets are specified as IP addresses, do a reverse-DNS lookup on them
to
to print hostnames in the output.
=item B<-N>, B<--netdata>

@ -2931,10 +2931,11 @@ void usage(int is_error)
fprintf(out, " -a, --alive show targets that are alive\n");
fprintf(out, " -A, --addr show targets by address\n");
fprintf(out, " -C, --vcount=N same as -c, report results in verbose format\n");
fprintf(out, " -d, --rdns show targets by name (force reverse-DNS lookup)\n");
fprintf(out, " -D, --timestamp print timestamp before each output line\n");
fprintf(out, " -e, --elapsed show elapsed time on return packets\n");
fprintf(out, " -i, --interval=MSEC interval between sending ping packets (default: %.0f ms)\n", interval / 1e6);
fprintf(out, " -n, --name show targets by name (-d is equivalent)\n");
fprintf(out, " -n, --name show targets by name (reverse-DNS lookup for target IPs)\n");
fprintf(out, " -N, --netdata output compatible for netdata (-l -Q are required)\n");
fprintf(out, " -o, --outage show the accumulated outage time (lost packets * packet interval)\n");
fprintf(out, " -q, --quiet quiet (don't show per-target/per-ping results)\n");

Loading…
Cancel
Save