[rochester-pm-list] ping

Shawn Porter sporter at rit.net
Tue Jan 4 07:57:52 CST 2000


Righ, Dave.  Ping usually uses icmp, though the default with Net::Ping
should be udp.  Only root can do icmp.  Anybody can do a udp or tcp
'ping'.  You can tell Net::Ping to use udp or tcp.

-> http://language.perl.com/newdocs/lib/Net/Ping.html

"The icmp protocol requires that the program be run as root or that it be
setuid to root. The tcp and udp protocols do not require special
privileges, but not all network devices implement the echo protocol for
tcp or udp."

--
Shawn Porter
http://www.rit.net/sporter
work - 716-223-3610 x116
home - 716-242-8742
sporter at rit.net

--
On Mon, 3 Jan 2000, David Simcik wrote:

> It could be that your account does not have permission to use Ping. I think this
> is mentioned in the Perl Cookbook by O'Reilly.
> 
> >>DTS<<
> 
> Bryan wrote:
> 
> > This is my code,
> >
> > #!/usr/bin/perl
> > print "Content-type: TEXT/HTML\n\n";
> > print "start ping<P>";
> > use Net::Ping;
> > $p = Net::Ping->new() or die "Can't create new ping object: $!\n";
> > print "yahoo.com is alive" if $p->ping('[D');
> > $p->close;
> > print "end ping";
> >
> > Why doesnt it work?
> >
> > I am using 9netave's server... and the code works, but returns only my start
> > and end print's thats it... anyone have any pointers for me?
> >
> > -Bryan
> 




More information about the Rochester-pm mailing list