Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!mcvax!kth!sunic!chalmers!cs.chalmers.se!lindberg From: lindberg@cs.chalmers.se (Gunnar Lindberg) Newsgroups: comp.protocols.tcp-ip Subject: Re: Domain Name Screaming Message-ID: <3128@fnatte.cs.chalmers.se> Date: 4 Jul 89 10:20:52 GMT References: <37397@sgi.SGI.COM> <8907022301.AA01289@erendira.arc.nasa.gov> <37409@sgi.SGI.COM> Sender: news@cs.chalmers.se Organization: Chalmers University of Technology, Sweden Lines: 31 In article <37409@sgi.SGI.COM> vjs@rhyolite.wpd.sgi.com (Vernon Schryver) writes: > ... >Always relying on either DNS or YP is an incomplete answer. It is >sometimes necessary to have your own, private extensions to the central >government's data... Yes, isn't the answer "lets have both"? We've tried to get around most problems with a "gethostbyname()" that uses an algorithm like: if (index(host, '.')) /* with '.', use DNS first */ { if ( ! (hp = get_ns_hostbyname(host))) hp = get_yp_hostbyname(host); } else /* no '.', assume local YP */ { if ( ! (hp = get_yp_hostbyname(host))) hp = get_ns_hostbyname(host); } This way we can use short names for hosts within several domains (yes I know I'm lazy, :-) and catch them via YP, while real domain names always get resolved by DNS (of course without "ypserv -i"). Possibly one could argue against at all using YP for names which contains a '.' - personally I don't think that does anything bad. We haven't tried this in "sharable libc" yet, but I would guess that's rather straight forward. If anyone wants the changes theyr're available for "ftp chalmers.se [129.16.1.1], get ucb/named-4.8-cth.shar". Gunnar Lindberg