[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] network problems



When I run the following code:

use Net::Ping;
use Socket;

$p = Net::Ping->new("tcp", 15);
$proto = getprotobyname('tcp');
print "proto: $proto\n";
$port = getservbyname('echo', 'tcp');
print "echo port: $port\n";
$host = "mail.clark.net";
$ip = inet_aton($host);
if (defined($ip)) {
	print "ip: $ip\n";
} else {
	print "ip is undefined for $host\n";
}

I get the following results:

proto: 6
echo port: 7
ip is undefined for mail.clark.net

All addresses are undefined, and this is where the ping code seems to fail when called.
This is the Ping.pm that was modified for MacPerl.

I am using the following versions:
MacPerl 5.1.5r4
MacOS 8.0
OT 1.2
TCP/IP 1.2
PPP 1.0.1

Should this combination of Perl code and system software work?
Other network code also fails, and it doesn't seem to matter if my PPP connection is already
established or not.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch