Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

icmp socket error

by bigup401 (Pilgrim)
on Feb 08, 2015 at 16:16 UTC ( #1115940=perlquestion: print w/replies, xml ) Need Help??

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

#!/usr/bin/perl use 5.010; use Net::Ping; $addr = <stdin>; chomp $addr; $p = Net::Ping->new("icmp"); if( $p->ping($addr)){ print "$addr is alive"; } else { print "$addr appear to be down"; } $p->close();

icmp socket error an attempt was made to access a socket in a way forbidden by its access permission

am using win7

Replies are listed 'Best First'.
Re: icmp socket error
by hippo (Bishop) on Feb 08, 2015 at 17:49 UTC

    From the Net::Ping documentation:

    Specifying the "icmp" protocol requires that the program be run as root or that the program be setuid to root.

    Therefore the supposition is that you are not doing that (or its equivalent under MSWindows, whatever that might be).

      Correct. You'll need to run the program as "Administrator", Windows equivalent of *nix "root".

      I use this on Windows 7 x64 / Strawberry 5.18.1 x64

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2022-01-21 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?