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
Rafael Garcia-Suarez
June 15, 2010 08:55
Re: [perl #75740] IPv6 support missing in perl5.10, perl5.12
Message ID:
On 15 June 2010 17:45, Nicholas Clark <> wrote:
>> 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::)
> We added inet_ntop and inet_pton to Socket in March 2009:

Ah, I already forgot about that.

> Hence they are already in Socket 5.12
> That leaves only getaddrinfo. What is wrong with also putting that in Socket?

And probably getnameinfo too, for good measure.
Yes, I agree, we could complement Socket with them. (And probably
ipv6 functionality as you suggested below)

>> > - 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 ?
> I think that this comes down to a policy/philosophy distinction.
> Either:
>  Socket is called Socket, not Socket4, and likewise NET::*, such as
>  IO::Socket::INET being that, not IO::Socket::INET4
>  Hence they're not just about IPv4, so *they* should be made to support
>  IPv6 too (and no new namespaces)
> Or:
>  IPv6 is something new, and it is reasonable for programs to need to load
>  new/different modules to support it.
> Personally, I prefer the former. I'm not sure how hard it is to get there.
> This means that I am disagreeing with the specific proposal to integrate
> Socket6 and IO;:Socket::INET6 into the code.
> Partly this is because I believe that it is viable (and not that hard)
> make this work in the core modules, without breaking the existing IPv6
> specific modules on CPAN, such that existing code that loads them will
> continue working, but new or updated code can be cleaner.

* What system had proved more effective?
* Indirect suggestion implicating selfinterest.
    -- Ulysses

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About