<?xml version="1.0" encoding="windows-1252"?>
<node id="42638" title="(tye)Re: Net::Ping troubles" created="2000-11-20 23:38:18" updated="2005-08-11 06:16:11">
<type id="11">
note</type>
<author id="22609">
tye</author>
<data>
<field name="doctext">
&lt;p&gt;
Doing TCP or UDP pings is often useless since most machines
(at least these days) don't service the TCP/UDP echo 
services.  This type of "ping" is like trying to telnet
to port 7 of a machine.  Most of the time this will just 
get you "connection refused" because nothing listens to
that port on so many machines.  But since UDP is not 
connection oriented, you can't get "connection refused"
so the ping just fails.
&lt;/p&gt;&lt;p&gt;
So you want to do &lt;code&gt;Net::Ping-&gt;new("icmp")&lt;/code&gt;, which
works for me.  You need to get at &lt;code&gt;0+$!&lt;/code&gt; in order
to understand what "unknown error" really is so we can
figure out what is going wrong.  Either modify Ping.pm so 
that it reports this or use the Perl debugger to step into
Ping.pm and query what that value is.  Perhaps you have to 
be "administrator" in order to use ICMP under WinNT?
&lt;/p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- 
&lt;a href="/index.pl?node=tye&amp;lastnode_id=1072"&gt;tye&lt;/a&gt; 
(but my friends call me "Tye")</field>
<field name="root_node">
42634</field>
<field name="parent_node">
42634</field>
</data>
</node>
