Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- socket change from 5.8.4 to 5.8.6?
April 16, 2005, 1:41 pm
rate this thread
I am on Windows 2000:
When I upgraded from 5.8.4 to 5.8.6, I can no longer create an ICMP
(io/socket/inet.pm is the same between versions 8.4 and 8.6)
I also tried using Net::Ping, which works in 5.8.4, but not 5.8.6
Works: perl 5.8.4 (source) and ActiveState perl 5.8.3
Doesn't work: 5.9.2 (source), 5.8.6 (source), ActiveState 5.8.6
(I just compiled all these 3 source versions, so I know I can compile 5.8.4
Anyone have any ideas? Can someone on 5.8.6+ run on windows and post back?
(I am on windows 2000 server, sp4)
my $sock = IO::Socket::INET->new(Proto=>$_);
print "$_ sock=$sock\n";
Re: socket change from 5.8.4 to 5.8.6?
I'm also unable to create an icmp socket using IO::Socket with perl 5.8.6
(mingw-built) on Windows 2000.
With perl 5.8.5 and perl 5.8.4 (both also built using mingw compiler)
there's no problem.
Socket, IO::Socket, IO::Handle, IO::Socket::INET, and IO::Socket::UNIX all
report the same version number between 5.8.5 and 5.8.6 - so it looks like
the explanation is to be found elsewhere within the perl 5.8.6 source
(possibly win32sck.c, which *has* changed).
When I try to run the code you provided on linux, the icmp socket also fails
to be created (perl 5.8.3, 5.8.4 and 5.8.6). However, if (on linux) I run
your code as root, the creation of the icmp socket succeeds. On Windows 2000
I find it
makes no difference whether I run your code as user or administrator.
If you take a look at t0_icmp_inst.t in Net-Ping-2.31, you'll see that
the second test will inevitably be skipped on Windows 2000 with the message
"icmp ping requires root privileges". Even if you run as administrator the
test is skipped and that message is displayed.
I deduce that creation of an icmp socket is something that should not be
achievable without root privileges - and that, in the past it *has* been
achievable on Windows 2000 without root privileges - and that, somehow, it
has now become unachievable on Windows 2000 under any circumstances ......
but I can't find anything about this in either 'perldoc perldelta' or
'perldoc perlport' or in the 'Changes' file in the perl 5.8.6 source. The
'Changes' file does mention a change to win32sck.c - but no mention of icmp
Looks like a bug to me - perhaps the p5p list would be able to shed more
light on this.