From: Hannes Diethelm <hannes.diethelm@gmail.com>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@lists.linux.dev
Subject: Re: [PATCH 1/1] tidbits: net-ping: add ping tidbit using raw socket
Date: Sun, 5 Jul 2026 17:27:55 +0200 [thread overview]
Message-ID: <7f0d1a81-adce-4d15-9707-87b8469cf8ae@gmail.com> (raw)
In-Reply-To: <87y0fpmqky.fsf@xenomai.org>
Am 05.07.26 um 16:57 schrieb Philippe Gerum:
> Hannes Diethelm <hannes.diethelm@gmail.com> writes:
>
>> This tidbit allows to ping any host and measure the response time.
>>
>> Signed-off-by: Hannes Diethelm <hannes.diethelm@gmail.com>
>> ---
>> tidbits/meson.build | 6 +
>> tidbits/oob-net-ping.c | 480 +++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 486 insertions(+)
>> create mode 100644 tidbits/oob-net-ping.c
>>
>
> Thanks. We need this to build on 32bit systems:
>
> --- a/tidbits/oob-net-ping.c
> +++ b/tidbits/oob-net-ping.c
> @@ -215,7 +215,7 @@ static size_t build_icmp_request(uint8_t *o_frame, size_t icmplen,
> icmphdr->checksum = cksum;
>
> if (verbosity > 1) {
> - evl_printf("ip_len=%zd, icmp_len=%zd, ip_len=%d, datalen=%ld\n",
> + evl_printf("ip_len=%zd, icmp_len=%zd, ip_len=%d, datalen=%zu\n",
> sizeof(*iphdr), sizeof(struct icmphdr),
> ntohs(iphdr->ip_len), datalen);
> print_ip_header(iphdr);
>
> What about turning this code into the (currently missing) 'evl-ping'
> utility? I believe it is of general interest to any user.
>
Thanks, I will fix this.
Why not. So I would move the code in the tools place and rename it? Meanwhile,
I was continuing work, so statistics are available, ping style.
oob-ping:
2 packets transmitted, 2 received, 0% packet loss, time 1633ms
rtt min/avg/max/mdev = 226.8/248.3/269.9/21.6 us
ping:
3 packets transmitted, 3 received, 0% packet loss, time 2030ms
rtt min/avg/max/mdev = 0.118/0.142/0.159/0.017 ms
The only difference is, that I use us instead of ms. That could confuse some users.
What do you think, stay at us or use ms?
BTW: This is in a VM, that's the reason for the bad timing.
next prev parent reply other threads:[~2026-07-05 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-28 15:39 [PATCH 0/1] tidbits: net-ping: add ping tidbit using raw socket Hannes Diethelm
2026-06-28 15:39 ` [PATCH 1/1] " Hannes Diethelm
2026-07-05 14:57 ` Philippe Gerum
2026-07-05 15:27 ` Hannes Diethelm [this message]
2026-07-05 16:52 ` Philippe Gerum
2026-07-05 15:01 ` [PATCH 0/1] " Philippe Gerum
2026-07-05 15:21 ` Hannes Diethelm
2026-07-05 16:49 ` Philippe Gerum
2026-07-05 22:17 ` Hannes Diethelm
2026-07-05 23:57 ` Hannes Diethelm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f0d1a81-adce-4d15-9707-87b8469cf8ae@gmail.com \
--to=hannes.diethelm@gmail.com \
--cc=rpm@xenomai.org \
--cc=xenomai@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.