From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id D07C55A02BC for ; Thu, 16 May 2024 09:10:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1715843449; bh=3x43UQqeVRKXcSxNUD7sLDIDGSnqvYWs1ZKXieLCPM4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=PnqwJGyT0U22BwHhpAEE2YFRqQ7osfBB5GBcVlBVtS1x6cdnC7+zCj7TQGMaE9emy D9eyzoDAHkV4heQFic9mE2RaCjGPYYTHP60vJJpoxIFQn2fpwCJXOVedT+EVd8D6Je 5QxLBCClyzwoygQhWVifd/25Ff6m6SYER7uP4qD06nBl3ZG25n7c2T6x4NUkFj0MoS OxL353nN/ArXMsjGh7/LV64ut6QNvVCpGc17b+qfaMZWLZ3x7S2T7rcA8CE7Y4B1NO sozQFed8M+1HfXRIbWV8qzwCA6Nb2lcyWkX4+JeeylIENmd83ws/L8jo1vpmUHLq+x ZuG6qGEJ+XoSw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Vg1TP4GpGz4wby; Thu, 16 May 2024 17:10:49 +1000 (AEST) Date: Thu, 16 May 2024 16:54:24 +1000 From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: Re: [PATCH] util, tcp: Add helper to display socket addresses Message-ID: References: <20240516052556.856811-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="My8FK9VmIxU5qWD+" Content-Disposition: inline In-Reply-To: <20240516052556.856811-1-david@gibson.dropbear.id.au> Message-ID-Hash: LREMHSQSHKV7TEMWOTDOOLYHQU5ZYSKO X-Message-ID-Hash: LREMHSQSHKV7TEMWOTDOOLYHQU5ZYSKO X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --My8FK9VmIxU5qWD+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 16, 2024 at 03:25:56PM +1000, David Gibson wrote: > When reporting errors, we sometimes want to show a relevant socket addres= s. > 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. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --My8FK9VmIxU5qWD+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmZFrZsACgkQzQJF27ox 2GeFeg/9GT8lXWHhCSVnxX9v5Xb0wmNr3xSMrwBSckWLJ1hO55x1chyz+cyF+MW7 ScOSKXV0DC1NFMOHUvAElID9wHhPs8z29ELvg35Rde0ghcCbPU58YqncfJklKN+t DfThxPIuCwIsMK+kdtGwoUNtKK199VOslwbi+K+WpWNivQG4nkr/IlCUoDI+YcDl cVDtYTrHtMU6l8iid9HAbmE+1Bmn8BdcQrXWL2o0cXR914/qTO4jcI8V2KgwH8xV 2WLQ1PyJ6OwmelTnLt7bveNo/cnkaPlI9umEHxeqSirCCP5jeGO41WX+lx6hlnvP kZNtAQnmOAb+oMzfDSj3BCk5DWsz0qKTN8a3PdxpOWd8+xGVGc7m/Gy81TBmTy31 rnkVzTmj026o8iEUEeNR5zfNTD0TTUvg+xdG3AyMYUKt1aTwD3vuFAdnt9ZUwi8W Sdf+erGR4Sj/e7iADhE3oCHeIIkrEHu+YDoO7zUsH5USpesjlWGIxz9k5eXWeZHa mEzPm3v0I6JCbaVg5udamCnZPQGoaNgId15Au7zGryqtI44zSszaTvNgWETSL/yn pEitFnzVsOh784ZcMQRQT3taP6MkkoYPTrTVD/C8cmp7ptx88sSC6wzJdk/tngP2 kOpsH3+dhObmanz8e/9CvmR/+Yv+cvjonGzzh+9pDU1FoTi3b+M= =uzGr -----END PGP SIGNATURE----- --My8FK9VmIxU5qWD+--