Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: IPv6 Name Resolution

by VinsWorldcom (Parson)
on Nov 22, 2011 at 18:22 UTC ( #939511=note: print w/replies, xml ) Need Help??

in reply to Re: IPv6 Name Resolution
in thread IPv6 Name Resolution

It seemed to good to be true and it was:

VinsWorldcom@C:\Users\VinsWorldcom\tmp> cat use Socket qw( getaddrinfo getnameinfo ); my ( $err, @addrs ) = getaddrinfo( $ARGV[0], 0 ); die $err if $err; my ( $err, $hostname ) = getnameinfo( $addrs[0]->{addr} ); die $err if $err; VinsWorldcom@C:\Users\VinsWorldcom\tmp> "getaddrinfo" is not exported by the Socket module "getnameinfo" is not exported by the Socket module Can't continue after import errors at C:\Users\VinsWorldcom\tmp\test.p +l line 1 BEGIN failed--compilation aborted at C:\Users\VinsWorldcom\tmp\ + line 1. VinsWorldcom@C:\Users\VinsWorldcom\tmp> perldoc Socket | grep getnamei +nfo VinsWorldcom@C:\Users\VinsWorldcom\tmp> perldoc Socket | grep getaddri +nfo VinsWorldcom@C:\Users\VinsWorldcom\tmp> perl -MSocket -e "print $Socke +t::VERSION" 1.87_01

While the latest version of Perl Socket (5.14.x) seems to support getXXXXinfo functions; remember, my original query asked for Windows 7, Strawberry Perl 5.12.3.

Replies are listed 'Best First'.
Re^3: IPv6 Name Resolution
by Anonymous Monk on Nov 30, 2011 at 22:42 UTC

    In that case, simply install Socket::GetAddrInfo; it's backed by the same XS and PP code that was copied into core Perl at 5.14.0.

    Also note that I'm in the process of making Socket dual-life, so you can install the current development version of that

    This is known to work back at least as far as Perl 5.10.0, and hopefully soon this will reach a real 1.95 release. This will mean your code continues to work unchanged on later Perls too.

Re^3: IPv6 Name Resolution
by VinsWorldcom (Parson) on Dec 01, 2011 at 15:48 UTC

    BRILLIANT! Thanks for your work on this. I'm doing quite a lot of IPv6 testing now as I'm seeing it pop up here and there. I'd like to be prepared knowing not just the networking aspect, but also the application development (C and Perl at least) angles to retrofitting IPv6 capabilities into existing applications.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939511]
[Corion]: Hi marto!
[Corion]: I hope all is well marto! ;) My godson had a surprise visit to the hospital yesterday because he fell and had cut his skin besides his eye, but everything was glued together again and all is well
[marto]: good grief, that's not fun, glad to hear all is as well as could be :)
[Corion]: marto: Yeah - their mother picked all three of them up at the kindergarden to then go to the hospital, and all three of them were well behaved, and all also were quite obedient when they came home, so they recognized the situation

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2016-12-08 09:20 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (137 votes). Check out past polls.