[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: PATCH: getting hostname/domainname
From:       Thiago Macieira <thiagom () mail ! com>
Date:       2001-02-09 19:42:39
[Download RAW message or body]

Stefan Westerfeld wrote:

When network transparency is enabled, artsd needs to get it's own
hostname/domainname, in a way that other clients anywhere on the net can
look it up, and connect. For instance just writing space:10032 as URL into
the object reference is useless, space.twc.de:10032 would work.
[snip]

The patch is attached. Is this the right way to do it?

Actually, this is not a fix. It's a workaround bad implementations.

According to the Texinfo documentation I have, gethostname() should always return \
FQDN (Fully Qualified Domain Name). However, I have seen it not return the full \
hostname. The most common cases is when the hostname is not configured properly.

However, I have no better solution. I'm not sure we can count on the existance of a \
dot in the hostname be an indication of FQDN. If that were possible, we could check \
for its presence. If it is not there, then log an error about poorly-configured site \
and do gethostbyname (which I don't like either).

-- 
  Thiago Macieira - UFOT Registry number: 1001
 thiagom@mail.com talha@geocities.com
   ICQ UIN: 1967141  PGP: 0x8F2978D5 and 0xEA9037A5
     Registered Linux user #65028

14/385. Of course, we are one big happy fleet. -- Khan Noonien Singh, Star Trek II: \
The Wrath of Khan


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic