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

[MacPerl] MacPerl reverse DNS



Hi there,

I am busy making a MacPerl script which logs website statistics. My point
is to log the hostmask that comes with the ip-number, thus a reverse DNS.
All i know is that on a Mac, DNS is pretty slow unless using the
commercial DNS server. 
I looked on the net and found some ways in doing this. 
One way was using some modules for perl, Net:DNS. That module comes with a
fast DNS resolver, but isn't available for MacPerl. What i'd like to know
is, wether ot not it is possible for me to easily port a *nix/win32 module
to MacPerl. Or maybe the DNS is already ported?
For now, i got this piece of code:

 $ipname[$dns] = (gethostbyaddr(pack("C4",split(/\./,$ip[$dns-1])),2))[0];

This works, but sometimes makes the server crash, and is almost never able
to find the hostmask. Yet on my linux box it runs as hell. I already tried
several nameservers, yet with no luck.
The servers are running macperl 5.2.0r4 and webstar 3.0.

Looking forward to your reply!
With regards,

Martijn Houtman
VT Internet Produkties



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org