Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Net::Telnet does support IPv6 - although not natively. By that, I mean, you can't do a:

Net::Telnet-new(host => 'IPv6.host.com');

I've been corresponding with Jay Rogers - author of Net::Telnet - to add native IPv6 support. He gave me a brilliant workaround that is very easy and not at all kludgey as many workarounds go.

Use the 'fhopen' argument of the new() constructor to take in an IPv6 connection (from say IO::Socket::IP). This is the example that works brilliantly for me:

use IO::Socket::IP -register; use Net::Telnet; ... my $socket = IO::Socket::IP->new( PeerHost => $IPv4orv6Host, PeerPort => 23, Family => AF_INET # or AF_INET6 ) or die "not connected\n"; my $session = Net::Telnet->new( fhopen => $socket ); ...

That will continue to work legacy is $IPv4orv6Host is an IPv4 host or hostname that resolves to an IPv4 address and will also support IPv6 hosts - since IO::Socket::IP can handle the IPv4/v6 address families. The Net::Telnet 'fhopen' argument simply operates on the open $socket handle.


In reply to Re: IPv6 Supported Perl Modules by VinsWorldcom
in thread IPv6 Supported Perl Modules by sameerb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    LanX is a dev version
    [marto]: That reminds me, I made some notes somewhere with regard W::M::C, I'll get round to a PR when I've time to flesh it out
    [Corion]: erix: But that makes for fun bug hunting. "What version of Chrome are you running?" "v62". "I also run v62 and it works on my machine". :-(
    [Corion]: marto: Great, looking forward to the PR!
    LanX wonders, do we have a rule against systematic down voting?
    [erix]: we frown :)
    [marto]: Does the command line arg --product-version@ help?
    [LanX]: xD
    [erix]: 'systematic' is going to be hard to define I think
    [marto]: Err no @

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (7)
    As of 2017-12-12 20:17 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What programming language do you hate the most?




















      Results (335 votes). Check out past polls.

      Notices?