Hi, I am trying to create an application that support Dual stack IP. I am using the IO::Socket::IP which allows both IPv4 and IPv6. Below is the piece of code I took from Socket::IP cpan page.
use Net::SSH2; use IO::Socket::IP; use Socket qw(:addrinfo SOCK_RAW); use Socket6; my $ipv6 = "2620:0:170:2531:60:165d:4f14:1068"; my $ipv4 = "10.243.106.8"; my $sock = IO::Socket::IP->new( PeerHost => $ipv6, PeerPort => "22", Timeout => 3 ) or die "Cannot construct socket - $@";
The above code is giving "Cannot construct socket - nodename nor servname provided" error. Initially I was using perl 5.20.2 and everything was working fine. Now,for some reason I had to move to 5.16.1 and this same piece of code is giving error.
I went through couple of posts discussing similar issues in ipv6 support. One suggestion I see is the usage of getaddrinfo. But, that doesn't help me in any way. Another post says, Socket doesn't support Ipv6. Another post suggests using socket6. I have tried all options and nothing helps
kindly provide suggestions. I believe I am missing out something in Perl 5.16.
In reply to Activeperl 5.16.1 Ipv6 support by rama133101
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |