|more useful options|
Net::Ping broken on Solaris?by bronto (Priest)
|on Sep 11, 2006 at 10:22 UTC||Need Help??|
bronto has asked for the
wisdom of the Perl Monks concerning the following question:
A colleague of mine has a test script that he uses to send ICMP ping packets for monitorning purposes. The script can be shortened to a one-liner like the following:perl -MNet::Ping -MTime::HiRes -le ' my $p=Net::Ping->new("icmp",3,3,"bge0") ; $p->hires() ; @r=$p->ping("10.39.15.20"); print "[$r] [$r]"'
Now, everything works on a couple of different Linux distributions, but on Solaris it dies with an error:error binding to device bge0 Option not supported by protocol at -e line 1
Needless to say, everything works fine if he doesn't specify the network interface. The problem is that he needs to, since he needs to test connectivity from both. I took a look at Net::Ping's code and the problem happens with a setsockopt call, but it seems so weird that no one noticed before...
Is anybody out there aware of a Solaris-specific bug of the module? I tried an handful of searches here and there (google, rt.cpan.org, perlmonks...) but none gave relevant results.
Thanks in advance
In theory, there is no difference between theory and practice. In practice, there is.