From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] util, tcp: Add helper to display socket addresses
Date: Thu, 16 May 2024 09:49:47 +0200 [thread overview]
Message-ID: <20240516094947.07eaba40@elisabeth> (raw)
In-Reply-To: <ZkWtoNC5WafjUOyC@zatzit>
On Thu, 16 May 2024 16:54:24 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:
> On Thu, May 16, 2024 at 03:25:56PM +1000, David Gibson wrote:
> > When reporting errors, we sometimes want to show a relevant socket address.
> > Doing so by extracting the various relevant fields can be pretty awkward,
> > so introduce a sockaddr_ntop() helper to make it simpler. For now we just
> > have one user in tcp.c, but I have further upcoming patches which can make
> > use of it.
>
> Realised I had an off-by-one error in my calculation of the max buffer
> size for this. Fixed version coming.
While at it, I was also wondering: would it be reasonably feasible,
without killing readability, to get inet_ntop() to write directly to
the buffer? I haven't tried to do it though.
--
Stefano
prev parent reply other threads:[~2024-05-16 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 5:25 [PATCH] util, tcp: Add helper to display socket addresses David Gibson
2024-05-16 6:54 ` David Gibson
2024-05-16 7:49 ` Stefano Brivio [this message]
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=20240516094947.07eaba40@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).