Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: ipv6 support on windows

by VinsWorldcom (Parson)
on Aug 01, 2012 at 10:58 UTC ( #984764=note: print w/replies, xml ) Need Help??

in reply to ipv6 support on windows

You're missing nothing? It works for me on Windows 7 with Strawberry 5.12.3.

VinsWorldcom@C:\Users\VinsWorldcom\tmp> ping ::1 Pinging ::1 with 32 bytes of data: Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Ping statistics for ::1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms VinsWorldcom@C:\Users\VinsWorldcom\tmp> Created a socket of type IO::Socket::IP VinsWorldcom@C:\Users\VinsWorldcom\tmp> ver Microsoft Windows [Version 6.1.7601] VinsWorldcom@C:\Users\VinsWorldcom\tmp> perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x +64-multi-thread Copyright 1987-2010, Larry Wall

Replies are listed 'Best First'.
Re^2: ipv6 support on windows
by VinsWorldcom (Parson) on Aug 01, 2012 at 23:45 UTC

    I forgot the dependencies on Windows. Despite what you read, the Socket module does not support IPv6 on Windows in Perl 5.14 (at least in the Strawberry distribution). You still need Socket6 or Socket::GetAddrInfo.

    As you'll see in the modified code below, IO::Socket::IP is using Socket::GetAddrInfo in my case since I have it installed - do you?

    use IO::Socket::IP -register; for my $m (sort(keys(%INC))) { print "$m\n" } my $sock = IO::Socket->new( Domain => PF_INET6, LocalHost => "::1", Listen => 1, ) or die "Cannot create socket - $@\n"; print "Created a socket of type " . ref($sock) . "\n";

    And the output:

    VinsWorldcom@C:\Users\VinsWorldcom\tmp> C:/strawberry/perl/lib/auto/POSIX/autosplit.ix C:/strawberry/perl/lib/auto/POSIX/ Exporter/ IO/ IO/ IO/Socket/ IO/Socket/ IO/Socket/ Socket/ Socket/GetAddrInfo/ Socket/GetAddrInfo/ Tie/ warnings/ Created a socket of type IO::Socket::IP
    UPDATE: Not quite right - the Socket module does support IPv6, the gcc compiler shipped with Strawberry 5.14 and recently verified 5.16 does not have the headers or the libraries to support compiling some of the IPv6 options - specifically inet_ntop() was failing for me. I recently corresponded with Paul Evans ( - maintainer of Socket - and he clarified this for me. I have a workaround for compiling IPv6 support in Socket for Strawberry Perl on Windows that works for both 5.14 and 5.16 documented
      thanks a lot, Socket6 worked for my active perl!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984764]
and the sunlight beams...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2017-02-23 02:43 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (338 votes). Check out past polls.