]> git.ipfire.org Git - people/ms/telemetry.git/commitdiff
legacy-gateway-latency4: Send a brief burst of packets
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Nov 2025 17:45:58 +0000 (17:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Nov 2025 17:45:58 +0000 (17:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/sources/legacy-gateway-latency4.c

index 8ee4c7a6c817b80bb51d7f0eb7a56b91094c3c07..c799425434d2bdefd4c62baa6a66c4cadf4c2449 100644 (file)
@@ -169,7 +169,15 @@ static int legacy_gateway_latency_on_success(td_ctx* ctx,
 
 static int do_arping(td_ctx* ctx, td_source* source, const char* address) {
        const char* argv[] = {
-               "arping", "-c3", address, NULL,
+               "arping",
+
+               // Send ten packets
+               "-c 10",
+
+               // Wait up to 100ms between packets
+               "-W 0.1",
+
+               address, NULL,
        };
 
        return td_source_run_command(source, argv, legacy_gateway_latency_on_success, source);
@@ -177,7 +185,21 @@ static int do_arping(td_ctx* ctx, td_source* source, const char* address) {
 
 static int do_ping(td_ctx* ctx, td_source* source, const char* address) {
        const char* argv[] = {
-               "ping", "-c3", address, NULL,
+               "ping",
+
+               // Send ten packets
+               "-c 10",
+
+               // Wait up to 100ms between packets
+               "-i 0.1",
+
+               // Don't reverse-resolve the IP address
+               "-n",
+
+               // The address
+               address,
+
+               NULL,
        };
 
        return td_source_run_command(source, argv, legacy_gateway_latency_on_success, source);