From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.tuxteam.de (mail.tuxteam.de [5.199.139.25]) by sourceware.org (Postfix) with ESMTPS id E7A7F3857C49 for ; Wed, 6 Jul 2022 05:04:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7A7F3857C49 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tuxteam.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tuxteam.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bjy9JaYOKqbrBJetnFrujjLOGb0u6DMaSY0lBFBq2Lk=; b=Cxc4jR8A/dOq3/qpDAJ4a+3ooG L8aQIUF8nXpFcLxvU1C3+NDJEExu5Pvghw/zej61rpZkTo4U6Wrblbq+JvSJZefFOnD3D+eR1ke1r GuoZxyds+UxSMR21s+leUcpd7dvcqABDHyZprjBAED8qvqDOFdLS0gfffzYH49ARfIBZdUZT4aF4p soS6x9H+7rXizAx9rOZN6vodAqtkZB5v+v4/E/TXqaXinXcWoajX+vkpHhF/WIUVZZUQ/cYzdt8YZ F4OrdlgTZ2OoGVV1UaQq4/EwB2LhfE445Dsh8SA05V31kgYUR5hwxjVQDY0dNSIHN0bVJp+yr1FTD nxJyadFg==; Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1o8xD3-0003GK-5v; Wed, 06 Jul 2022 07:04:21 +0200 Date: Wed, 6 Jul 2022 07:04:21 +0200 From: tomas@tuxteam.de To: Ian Pilcher Cc: libc-help@sourceware.org Subject: Re: inet_net_pton() alternative for IPv6 Message-ID: References: <8698a1da-4656-0450-fac3-c7b7fc422903@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TnqCVHinszeGdSQY" Content-Disposition: inline In-Reply-To: <8698a1da-4656-0450-fac3-c7b7fc422903@gmail.com> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2022 05:04:24 -0000 --TnqCVHinszeGdSQY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 05, 2022 at 06:58:00PM -0500, Ian Pilcher wrote: > On 7/4/22 13:23, tomas@tuxteam.de wrote: > > I never tried it, but this is what my version [1] of the libc docs say: > >=20 > > -- Function: int inet_pton (int AF, const char *CP, void *BUF) > >=20 > > Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX > > Safety Concepts::. > >=20 > > This function converts an Internet address (either IPv4 or IPv6) > > from presentation (textual) to network (binary) format. AF should > > be either =E2=80=98AF_INET=E2=80=99 or =E2=80=98AF_INET6=E2=80=99= , as appropriate for the type of > > address being converted. CP is a pointer to the input string, and > > BUF is a pointer to a buffer for the result. It is the caller=E2= =80=99s > > responsibility to make sure the buffer is large enough. >=20 >=20 > You're looking at the wrong function. inet_pton() does support IPv6; > inet_net_pton() does not (even though its interface is designed in a > way that it could accomodate it). I see, thanks > --=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Google Where SkyNet meets Idiocracy > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The irony is that you are posting from... gmail :) Cheers --=20 t --TnqCVHinszeGdSQY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYsUXzwAKCRAFyCz1etHa RotwAJ4p4MbWEKGSYNkmGbTlopYXr2Ky/wCdEHnCtqYHWB3/1a7QPEoWyWz0De8= =cP4P -----END PGP SIGNATURE----- --TnqCVHinszeGdSQY--