develooper Front page | perl.perl5.porters | Postings from June 2010

Re: [perl #75740] IPv6 support missing in perl5.10, perl5.12

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
June 15, 2010 01:00
Subject:
Re: [perl #75740] IPv6 support missing in perl5.10, perl5.12
Message ID:
AANLkTilb4HXHBfJu92I1Jy391aOQ1ykLG73Xjseugw-U@mail.gmail.com
On 14 June 2010 18:39, sullr@cpan.org <perlbug-followup@perl.org> wrote:
> What's missing in the CORE:
> - getaddrinfo (gethostbyname gives only IPv4)
> - inet_pton, inet_ntop (similar to inet_aton, inet_ntoa but also for
>  IPv6)

Note that Configure already probes for those functions.

> - support for IPv6 in Net::* Modules (Net::SMTP, Net::FTP.. are bound to
>  use IO::Socket::INET which does not do IPv6)
> - comfortable use of sockets similar to IO::Socket::INET6
>
> What help could CPAN provide:
> - Socket6 - which provides getaddrinfo, inet_ntop, inet_pton..

I'd vote against : looking at it, its compilation process is too
complex, it contains an incomplete implementation of getaddrinfo (used
when the system has none), and its license is complex.

We could provide instead a bare-bones module that just wraps around
getaddrinfo, getnameinfo, inet_ntop and inet_pton (maybe other ones).

What about the IP:: namespace for those ? (or we could also stuff them
in POSIX::)

> - IO::Socket::INET6 which is similar to IO::Socket::INET but supports
>  also IPv6

It currently requires Socket6, which could be made optional.

> - Net::INET6Glue, which is a hack to provide IPv6 functionality in the
>  Net::* Modules, LWP...
>
> So what could be done?
> I think it's not that hard:
> - integrate Socket6 and IO::Socket::INET6 into CORE, complementing
>  Socket and IO::Socket::INET
> - integrate IPv6 in the Net::* CORE modules, thus making a lot of
>  Net::INET6Glue obsolete. This is not hard, it's mostly using
>  IO::Socket::INET6 instead of IO::Socket::INET if available. I did this
>  with IO::Socket::SSL already, which is automatically IPv6 aware if
>  IO::Socket::INET6 is available.
>  The added functionality needed for Net::FTP can be used from
>  Net::INET6Glue::FTP.

For that you'd need to ask Graham Barr, maintainer of libnet on CPAN.
The perl core just integrates the CPAN version. I personally like the
idea. Graham ?

> Who can do it?
> - I could definitly help with the Net::* Modules because I have already
>  most of the code from writing Net::INET6Glue
> - From my experience the maintainer of IO::Socket::INET6 seems to be a
>  nice and responsive guy so he might help to move the module to CORE.
>  It has no dependencies on non CORE except Socket6.
> - I don't know about the Socket6 maintainer, but the module is stable
>  for years and has not dependencies to non CORE modules.
>
> When can it be done?
> As soon as possible. I think it's not hard to fix.

Thanks for volunteering!

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About