Front page | perl.perl5.porters |
Postings from February 2000
Re: fixing Sys::Hostname
From:
Russ Allbery
Date:
February 8, 2000 15:39
Subject:
Re: fixing Sys::Hostname
Message ID:
ylhffjgt6g.fsf@windlord.stanford.edu
Nick Ing-Simmons <nik@tiuk.ti.com> writes:
> If I do gethostbyname('localhost') on such a machine I get 'localhost'
> back. But I would "like" to get back "pluto" or "pluto.tiuk.ti.com"
> Thus my entry "should" be :
> 127.0.0.1 pluto.tiuk.ti.com pluto localhost
> and yours "should" be :
> 127.0.0.1 chthon.perl.com chthon localhost
The difficulty with doing this comes when you turn around and want to do a
forward lookup. Now, when you look up chthon.perl.com, what IP address do
you get? Both? At least Solaris uses this mapping to figure out how what
IP address to apply to different interfaces, so this potentially breaks a
lot of assumptions.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>