develooper Front page | perl.perl5.porters | Postings from August 2001

Re: Adding IPv6 to Perl

Thread Previous | Thread Next
Jeff Okamoto
August 17, 2001 15:03
Re: Adding IPv6 to Perl
Message ID:
> > 1.  No changes to core of Perl.  The existing core networking functions
> > will not be changed, and thus will not be IPv6-compatible.
> This I don't get.  To me the existing core networking functions seems
> to be totally IPv6-compatible.  You just pass them different kind of
> structs.

Yes, that's true.  But because I don't want to change Perl's existing
core, then we need different versions of connect, etc. that pass the
correct structures.

I want to put all of the IPv6 functions into a module because I want
only ONE version of Perl.  I want to be able to compile Perl on an
IPv6-capable system then take that binary to an IPv4-only system and
still have old scripts work.

> > 4. The new Socket6 module will only include IPv6 routines.  The old Socket
> > module will be left alone.
> Seems ok.  What is wrong with the module that is on CPAN now?

It's incomplete.  I'm working on adding the "mising functions".  Also,
it relies on its own configure script.  That needs to be integrated into
Perl's Configure.

> What does IO::Socket have to do with it?  It should not be affected by
> an IPv6 enabled

I believe the current vision is to move away from the raw networking
calls and use objects instead.  IIRC, bareword filehandles are going
away, and so that means the socket call as implemented must change.

I want to make IO::Socket intelligent and Socket6 dumb.  The IPv6
functions will reside in Socket6 and IO::Socket will decide which ones
to call.  This will depend on either envars, flags passed to the
constructor, or the presence of the Socket6 module.  When the constructor
is called, it can determine what version of IP should be used, based on
these factors.

> Why can't we just make IO::Socket::INET do the right thing.  If it is
> passed in a literal IPv6 address make an IPv6 socket.  If it is passed
> a hostname look the host up.  If it has AAAA records use IPv6.  If it
> only has A record use that.  There might be some environment variable
> to select what to prefer when both A and AAAA records are available.

Right, this is the current vision.  But we need to split INET4 and INET6
so that the proper structures get passed.


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