nping converts the --rate option to millisecond delay using 1000 / rate, which means that a rate over 1000 equals a delay of 0.
As only millisecond delay is supported, a --delay less than 0.001 seconds also equals a delay of 0.
This behavior doesn't seem to be documented and the result can be an order of magnitudes higher packet rate:
nping -H -N -c 10000 --rate 1000 127.0.0.1
Starting Nping 0.7.80 ( https://nmap.org/nping )
Max rtt: N/A | Min rtt: N/A | Avg rtt: N/A
Raw packets sent: 10000 (280.000KB) | Rcvd: 0 (0B) | Lost: 10000 (100.00%)
Nping done: 1 IP address pinged in 12.00 seconds
nping -H -N -c 10000 --rate 1001 127.0.0.1
Starting Nping 0.7.80 ( https://nmap.org/nping )
Max rtt: N/A | Min rtt: N/A | Avg rtt: N/A
Raw packets sent: 10000 (280.000KB) | Rcvd: 0 (0B) | Lost: 10000 (100.00%)
Nping done: 1 IP address pinged in 0.09 seconds
In my opinion, nping should exit with an error message if the rate is 0 without --rate 0 being explicitly requested.
Other than that, it would be nice if nping could support delays < 1ms. Is this feasible?
nping converts the
--rateoption to millisecond delay using1000 / rate, which means that a rate over1000equals a delay of0.As only millisecond delay is supported, a
--delayless than0.001seconds also equals a delay of0.This behavior doesn't seem to be documented and the result can be an order of magnitudes higher packet rate:
In my opinion, nping should exit with an error message if the rate is 0 without
--rate 0being explicitly requested.Other than that, it would be nice if nping could support delays < 1ms. Is this feasible?