At 07:13 AM 10/23/01 -0400, Gary L. Armstrong wrote:
>I had similar results as Daniel before I read the docs, but from his code he
>is using ICMP so I didn't think he was having the same problem.
Dang, I didn't read properly, sorry. The old reflex kicked off automatically.
In that case, I'd need to see the error message.
>However, per
>the docs, you have to be root to use ICMP. Does this then mean that when run
>as "not-root" the ICMP parameter is ignored and defaults to TCP? That might
>explain this.
I don't think so:
% perl -MNet::Ping -le '$p = Net::Ping->new("icmp"); print "Ok" if
$p->ping("cnn.com")'
icmp ping requires root privilege at -e line 1
That's 5.6.1.
>-=GLA=-
>
>-----Original Message-----
>From: Peter Scott [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 23, 2001 1:52 AM
>To: Daniel Falkenberg; [EMAIL PROTECTED]
>Subject: Re: Net::Ping
>
>
>At 11:28 AM 10/23/01 +0930, Daniel Falkenberg wrote:
>
> >Firstly. I have a host using a 56k modem connection. When I ping these
> >servers using the ping object....
> >
> >$p = Net::Ping->new("icmp");
> >
> >If the server that is being pinged doesn't respond it generates an error
> >message. Then when I go and ping the supposedly failed server manually
> >from a command prompt it responds.
> >
> >Does any one have any ideas as to why this is doing that?
>
>Is this an FAQ yet? I've lost count of the number of times I've answered
>it.
>
>Net::Ping uses TCP pings by default. You may not get a response to a TCP
>ping for a variety of reasons, usually because some router doesn't want to
>pass them. The 'ping' program uses ICMP pings, which routers are far more
>amenable to passing. (But it's not guaranteed. So if you want to know,
>"Is host X up?", the best way to answer it is to test for access to the
>actual service you're interested in on X.)
>
>So, you want Net::Ping to use the ICMP type of ping? Go ahead, you can
>configure it to do that (see the docs). But you have to be root to run
>it. The ping program is setuid root, so it's covered. Making perl scripts
>setuid, on the other hand, is not for the casual user.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]