1 # Test to make sure object can be instantiated for icmp protocol.
2 # Root access is required to actually perform icmp testing.
5 unless (eval "require Socket") {
6 print "1..0 \# Skip: no Socket\n";
15 # Everything loaded fine
18 if (($> and $^O ne 'VMS' and $^O ne 'cygwin')
22 and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/))) {
23 skip "icmp ping requires root privileges.", 1;
24 } elsif ($^O eq 'MacOS') {
25 skip "icmp protocol not supported.", 1;
27 my $p = new Net::Ping "icmp";
32 return unless $^O eq 'MSWin32';
33 return unless eval { require Win32 };
34 return unless defined &Win32::IsAdminUser;
35 return Win32::IsAdminUser();