From owner-freebsd-questions Fri Nov 23 15:42:58 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail5.carolina.rr.com (fe5.southeast.rr.com [24.93.67.52]) by hub.freebsd.org (Postfix) with ESMTP id C292337B405 for ; Fri, 23 Nov 2001 15:42:54 -0800 (PST) Received: from snafu.enterit.com ([66.57.159.198]) by mail5.carolina.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Fri, 23 Nov 2001 17:06:45 -0500 Message-Id: <5.1.0.14.0.20011123172728.02c61518@mail.enterit.com> X-Sender: jconner@enterit.com@mail.enterit.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 23 Nov 2001 17:30:43 -0500 To: The Anarcat From: Jim Conner Subject: Re: can't do reverse dns with /etc/hosts Cc: cjclark@alum.mit.edu, FreeBSD Questions In-Reply-To: <20011123213032.GC26346@shall.anarcat.dyndns.org> References: <5.1.0.14.0.20011123164749.0245ec60@mail.enterit.com> <20011114173647.D66694@blossom.cjclark.org> <20011115012039.GA61093@shall.anarcat.dyndns.org> <20011114173647.D66694@blossom.cjclark.org> <5.1.0.14.0.20011123164749.0245ec60@mail.enterit.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 16:30 11.23.2001 -0500, The Anarcat wrote: >On Fri Nov 23, 2001 at 04:48:54PM -0500, Jim Conner wrote: > > At 16:14 11.23.2001 -0500, The Anarcat wrote: > > >On Wed Nov 14, 2001 at 05:36:47PM -0800, Crist J. Clark wrote: > > >> > > >> host(1) _always_ uses DNS. > > >> > > > > > >Doh! I should have RTFM... sorry. > > > > > >Is there a tool that doesn't use just DNS? > > > > grep hostname /etc/hosts > > grep password /etc/hosts > > > > Those ought to work. > >The thing is that I want to test the functionality of the resolver. > >I need a simple userland gethostby* interface. :) nslookup and host and >friends are all DNS oriented, IIUC. > >Anyways, I'll probably end up writing my own one-liner. ;) Unfortunately, I am not familiar with such a thing. I have been in need of the same kind of tool. I will be interested to see what others say. It seems obvious to me that this is not a name lookup mechanism but a type of Unix lookup since the /etc/hosts file was used way before DNS was ever thought up. There must be a built-in tool/library somewhere that can do what you are trying to accomplish. >A. - Jim -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- http://www.perlmonks.org/index.pl?node_id=67861&lastnode_id=67861 -----BEGIN PERL GEEK CODE BLOCK----- ------BEGIN GEEK CODE BLOCK------ Version: 0.01 Version: 3.12 P++>*@$c?P6?R+++>++++@$M GIT/CM/J d++(--) s++:++ a- >++++$O!MA->++++E!> PU-->+++BD C++++(+) UB++++$L++++$S++++$ $C-@D!>++++(-)$S++++@$X?WP+>++++MO!>+++ P++(+)>+++++ L+++(++++)>+++++$ !E* +PP+++>++++n-CO?PO!o >++++G W++(+++) N+ o !K w--- PS---(-)@ PE >*(!)$A-->++++@$Ee---(-)Ev++uL++>*@$uB+ Y+>+++ PGP t+(+++)>+++@ 5- X++ R@ >*@$uS+>*@$uH+uo+w-@$m! tv+ b? DI-(+++) D+++(++) G(++++) ------END PERL GEEK CODE BLOCK------ ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message