From: tomas@tuxteam.de
To: Ian Pilcher <arequipeno@gmail.com>
Cc: libc-help@sourceware.org
Subject: Re: inet_net_pton() alternative for IPv6
Date: Wed, 6 Jul 2022 07:04:21 +0200 [thread overview]
Message-ID: <YsUX1dayEDFNyYgv@tuxteam.de> (raw)
In-Reply-To: <8698a1da-4656-0450-fac3-c7b7fc422903@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
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:
> >
> > -- Function: int inet_pton (int AF, const char *CP, void *BUF)
> >
> > Preliminary: | MT-Safe locale | AS-Safe | AC-Safe | *Note POSIX
> > Safety Concepts::.
> >
> > This function converts an Internet address (either IPv4 or IPv6)
> > from presentation (textual) to network (binary) format. AF should
> > be either ‘AF_INET’ or ‘AF_INET6’, 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’s
> > responsibility to make sure the buffer is large enough.
>
>
> 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
> --
> ========================================================================
> Google Where SkyNet meets Idiocracy
> ========================================================================
The irony is that you are posting from... gmail :)
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2022-07-06 5:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 18:07 Ian Pilcher
2022-07-04 18:23 ` tomas
2022-07-05 23:58 ` Ian Pilcher
2022-07-06 5:04 ` tomas [this message]
2022-07-04 18:34 ` Florian Weimer
2022-07-04 19:34 ` Ian Pilcher
2022-07-04 19:57 ` Florian Weimer
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=YsUX1dayEDFNyYgv@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=arequipeno@gmail.com \
--cc=libc-help@sourceware.org \
/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 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 read-only IMAP folder(s) and NNTP newsgroup(s).