Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

io::socket::inet change from 5.8.4 to 5.8.6?

by smackdab (Pilgrim)
on Apr 16, 2005 at 06:17 UTC ( [id://448415]=perlquestion: print w/replies, xml ) Need Help??

smackdab has asked for the wisdom of the Perl Monks concerning the following question:

I am on win32 and when I upgraded from 5.8.4 to 5.8.6 (on Windows 2000) I can no longer create an ICMP socket...
use IO::Socket::INET; my $sock = IO::Socket::INET->new(Proto=>shift); print "sock=$sock\n"; on 5.8.4 perl -w test.pl tcp = ok perl -w test.pl udp = ok perl -w test.pl icmp = ok on 5.8.6 perl -w test.pl tcp = ok perl -w test.pl udp = ok perl -w test.pl icmp = NO
any ideas??? io/socket/inet.pm is the same between versions... and i also tried using Net::Ping, which works in 5.8.4, but not 5.8.6. google didn't turn up any bugs

Replies are listed 'Best First'.
Re: io::socket::inet change from 5.8.4 to 5.8.6?
by webengr (Pilgrim) on Apr 16, 2005 at 07:31 UTC
    Don't know if this is helpful -- I don't have much experience w/ socket level code. I use Cygwin Perl 5.8.6 on Win2KSP4:
    #!/usr/local/bin/perl use strict; use warnings; use IO::Socket::INET; my $sock; for ("tcp","udp","icmp","ugly") { # include a bad one $sock = IO::Socket::INET->new(Proto=>$_) or die "Oops: $@"; print "$_ sock=$sock\n"; print ref($sock), $/; }
    Results:
    $ ./socktest.pl tcp sock=IO::Socket::INET=GLOB(0xa0aa72c) IO::Socket::INET udp sock=IO::Socket::INET=GLOB(0xa0aa6c0) IO::Socket::INET icmp sock=IO::Socket::INET=GLOB(0xa0aa78c) IO::Socket::INET Oops: IO::Socket::INET: Bad protocol 'ugly' at ./socktest.pl line 8.
    PCS
Re: io::socket::inet change from 5.8.4 to 5.8.6?
by smackdab (Pilgrim) on Apr 16, 2005 at 06:57 UTC
    More details: 5.9.2 doesn't work, ActiveState perl 8.3 does work, and ActiveState perl 8.6 does...
    >
    More stuck than i was before ;-)
      oops a typo...ActiveState perl 5.8.6 does not work...

      can somebody on 5.8.6+ run this test if you are on some win32 platform and post the results?

      thanks!
Re: io::socket::inet change from 5.8.4 to 5.8.6?
by Forsaken (Friar) on Apr 16, 2005 at 20:05 UTC
    Tested it and encountered the same phenomenon, 5.8.4 works, 5.8.6 doesn't. WinXP SP2 box using ActivePerl. If it's any consolation, it's not a problem specific to your setup from the looks of it...

    Now, time to restore my PATH settings back to the 5.6.8 binary :)

    Remember rule one...
Re: io::socket::inet change from 5.8.4 to 5.8.6?
by smackdab (Pilgrim) on Apr 17, 2005 at 03:14 UTC
    looks like ICMP and win32 isn't too popular...as it looks like a bug from a recent addition to 5.8.6:

    I posted to p5p so they could fix it correctly...all I could do was a hack ;-) to get it working for me...

    If anyone else reads this, don't call "open_ifs_socket()" replace it with "socket()". IFS won't work, but I didn't care

    Looks like this new addition had a side-effect:
    Change 23317: Integrate:
    Nicholas Clark
    Fri, 10 Sep 2004 08:00:21 -0700




    (here is the change: Change 23573: Create perl587delta.pod) PERL_ALLOW_NON_IFS_LSP (specific to the Win32 port) Set to 1 to allow the use of non-IFS compatible LSP's. Perl normally searches for an IFS-compatible LSP because this is required for its emulation of Windows sockets as real filehandles. However, this may cause problems if you have a firewall such as McAfee Guardian which requires all applications to use its LSP which is not IFS-compatible, because clearly Perl will normally avoid using such an LSP. Setting this environment variable to 1 means that Perl will simply use the first suitable LSP enumerated in the catalog, which keeps McAfee Guardian happy (and in that particular case Perl still works too because McAfee Guardian's LSP actually plays some other games which allow applications requiring IFS compatibility to work).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://448415]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-25 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found