Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Dearest Monks

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[0]] [$r[1]]"'

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

Ciao!
--bronto


In theory, there is no difference between theory and practice. In practice, there is.

In reply to Net::Ping broken on Solaris? by bronto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2021-11-29 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?