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]