| Summary: | no userland tool available to test resolver facilities | ||
|---|---|---|---|
| Product: | Base System | Reporter: | AnarCat <AnarCat> |
| Component: | bin | Assignee: | Crist J. Clark <cjc> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.4-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
AnarCat
2001-11-26 23:10:01 UTC
Anyway how about putting this tool as a port? It would be helpful for other users. anarcat> However, no tool is available to query the resolver (in the anarcat> sense of gethostbyname/addr() routines) anarcat> transparently. Host(1), dig(1), nslookup(1) all use the name anarcat> servers, and not the /etc/hosts files or NIS/YP. But only host(1) and its friend does check only DNS, these are the exceptions. You can use other networking tools such as ping(8), telnet(1), and more (I don't know which tool fits for you). anarcat> Try to do a address to hostname lookup using a command line anarcat> tool for an address in /etc/hosts that will actually use anarcat> gethostbyname(3). It would be better that you use getaddrinfo(3) instead. This tool only works with IPv4 address but FreeBSD knows what IPv6 is. -- - Makoto `MAR' Matsushita Responsible Changed From-To: freebsd-bugs->cjc I helped start it. I'll finish it. On Mon, Nov 26, 2001 at 06:20:01PM -0800, Makoto Matsushita wrote:
> The following reply was made to PR bin/32318; it has been noted by GNATS.
>
> From: Makoto Matsushita <matusita@jp.freebsd.org>
> To: FreeBSD-gnats-submit@FreeBSD.ORG
> Cc:
> Subject: Re: bin/32318: no userland tool available to test resolver
> facilities
> Date: Tue, 27 Nov 2001 11:11:10 +0900
>
> Anyway how about putting this tool as a port? It would be helpful for
> other users.
>
> anarcat> However, no tool is available to query the resolver (in the
> anarcat> sense of gethostbyname/addr() routines)
> anarcat> transparently. Host(1), dig(1), nslookup(1) all use the name
> anarcat> servers, and not the /etc/hosts files or NIS/YP.
>
> But only host(1) and its friend does check only DNS, these are the
> exceptions. You can use other networking tools such as ping(8),
> telnet(1), and more (I don't know which tool fits for you).
>
> anarcat> Try to do a address to hostname lookup using a command line
> anarcat> tool for an address in /etc/hosts that will actually use
> anarcat> gethostbyname(3).
>
> It would be better that you use getaddrinfo(3) instead. This tool
> only works with IPv4 address but FreeBSD knows what IPv6 is.
For the record, 'cd /usr/ports && make search key=resolv' lists, among
others, the net/ghtool and the net/geta ports. I know that ghtool does
not do IPv6, but the geta description seems to imply that it does.
G'luck,
Peter
--
This sentence would be seven words long if it were six words shorter.
roam> For the record, 'cd /usr/ports && make search key=resolv' lists, among roam> others, the net/ghtool and the net/geta ports. I know that ghtool does roam> not do IPv6, but the geta description seems to imply that it does. I've installed geta and found that it works pretty well. galtvalion % cat /etc/nsswitch.conf hosts: files dns galtvalion % grep www.FreeBSD.org /etc/hosts 127.0.0.3 www.FreeBSD.org galtvalion % cat /etc/nsswitch.conf hosts: files dns galtvalion % geta www.FreeBSD.org 127.0.0.3 Great :-) -- - Makoto `MAR' Matsushita Are the existing ports that serve this function enough for you, Peter? Would you like to close up the PR? -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org On Fri, Nov 30, 2001 at 03:51:56AM -0800, Crist J. Clark wrote:
> Are the existing ports that serve this function enough for you, Peter?
> Would you like to close up the PR?
I think net/geta works fine. Closing this PR would be fine by me;
what does the submitter - the Anarcat - think about it, though? :)
G'luck,
Peter
--
If wishes were fishes, the antecedent of this conditional would be true.
On Fri, Nov 30, 2001 at 04:00:02AM -0800, Crist J. Clark wrote: > The following reply was made to PR bin/32318; it has been noted by GNATS. > > From: "Crist J. Clark" <cristjc@earthlink.net> > To: Peter Pentchev <roam@ringlet.net> > Cc: bug-followup@freebsd.org, > Makoto Matsushita <matusita@jp.freebsd.org> > Subject: Re: bin/32318: no userland tool available to test resolver facilities > Date: Fri, 30 Nov 2001 03:51:56 -0800 > > Are the existing ports that serve this function enough for you, Peter? > Would you like to close up the PR? Err... I mean The Anarcat, not Peter. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org "Crist J. Clark" wrote:
>
> On Fri, Nov 30, 2001 at 04:00:02AM -0800, Crist J. Clark wrote:
> > The following reply was made to PR bin/32318; it has been noted by GNATS.
> >
> > From: "Crist J. Clark" <cristjc@earthlink.net>
> > To: Peter Pentchev <roam@ringlet.net>
> > Cc: bug-followup@freebsd.org,
> > Makoto Matsushita <matusita@jp.freebsd.org>
> > Subject: Re: bin/32318: no userland tool available to test resolver facilities
> > Date: Fri, 30 Nov 2001 03:51:56 -0800
> >
> > Are the existing ports that serve this function enough for you, Peter?
> > Would you like to close up the PR?
>
> Err... I mean The Anarcat, not Peter.
> --
> Crist J. Clark | cjclark@alum.mit.edu
> | cjclark@jhu.edu
> http://people.freebsd.org/~cjc/ | cjc@freebsd.org
No. I don't think I have been clear enough. Ping(1) and friends are good
to test one *part* of the functionality: classic address resolution. But
they do not help in testing reverse address resolution, from what I can
tell from net/geta/pkg-descr...
I haven't tested geta, though. Give me time and I will.
A.
On Fri, Nov 30, 2001 at 07:35:30AM -0500, The Anarcat wrote:
> "Crist J. Clark" wrote:
> >
> > On Fri, Nov 30, 2001 at 04:00:02AM -0800, Crist J. Clark wrote:
> > > The following reply was made to PR bin/32318; it has been noted by GNATS.
> > >
> > > From: "Crist J. Clark" <cristjc@earthlink.net>
> > > To: Peter Pentchev <roam@ringlet.net>
> > > Cc: bug-followup@freebsd.org,
> > > Makoto Matsushita <matusita@jp.freebsd.org>
> > > Subject: Re: bin/32318: no userland tool available to test resolver facilities
> > > Date: Fri, 30 Nov 2001 03:51:56 -0800
> > >
> > > Are the existing ports that serve this function enough for you, Peter?
> > > Would you like to close up the PR?
> >
> > Err... I mean The Anarcat, not Peter.
> > --
> > Crist J. Clark | cjclark@alum.mit.edu
> > | cjclark@jhu.edu
> > http://people.freebsd.org/~cjc/ | cjc@freebsd.org
>
>
> No. I don't think I have been clear enough. Ping(1) and friends are good
> to test one *part* of the functionality: classic address resolution. But
> they do not help in testing reverse address resolution, from what I can
> tell from net/geta/pkg-descr...
>
> I haven't tested geta, though. Give me time and I will.
It works, though.
[root@straylight:v0 ~]# fgrep 1.2.3.4 /etc/hosts
1.2.3.4 geta.test.nonexist
[root@straylight:v0 ~]# geta geta.test.nonexist
1.2.3.4
[root@straylight:v0 ~]# geta -r 1.2.3.4
1.2.3.4
Reverse map: geta.test.nonexist
[root@straylight:v0 ~]#
And no, I do not have either 'nonexist' or '4.in-addr.arpa'
in any DNS map :)
G'luck,
Peter
--
Hey, out there - is it *you* reading me, or is it someone else?
On Fri Nov 30, 2001 at 02:54:25PM +0200, Peter Pentchev wrote:
> On Fri, Nov 30, 2001 at 07:35:30AM -0500, The Anarcat wrote:
> > "Crist J. Clark" wrote:
> > >
> > > On Fri, Nov 30, 2001 at 04:00:02AM -0800, Crist J. Clark wrote:
> > > > The following reply was made to PR bin/32318; it has been noted by GNATS.
> > > >
> > > > From: "Crist J. Clark" <cristjc@earthlink.net>
> > > > To: Peter Pentchev <roam@ringlet.net>
> > > > Cc: bug-followup@freebsd.org,
> > > > Makoto Matsushita <matusita@jp.freebsd.org>
> > > > Subject: Re: bin/32318: no userland tool available to test resolver facilities
> > > > Date: Fri, 30 Nov 2001 03:51:56 -0800
> > > >
> > > > Are the existing ports that serve this function enough for you, Peter?
> > > > Would you like to close up the PR?
> > >
> > > Err... I mean The Anarcat, not Peter.
> > > --
> > > Crist J. Clark | cjclark@alum.mit.edu
> > > | cjclark@jhu.edu
> > > http://people.freebsd.org/~cjc/ | cjc@freebsd.org
> >
> >
> > No. I don't think I have been clear enough. Ping(1) and friends are good
> > to test one *part* of the functionality: classic address resolution. But
> > they do not help in testing reverse address resolution, from what I can
> > tell from net/geta/pkg-descr...
> >
> > I haven't tested geta, though. Give me time and I will.
>
> It works, though.
>
> [root@straylight:v0 ~]# fgrep 1.2.3.4 /etc/hosts
> 1.2.3.4 geta.test.nonexist
> [root@straylight:v0 ~]# geta geta.test.nonexist
> 1.2.3.4
> [root@straylight:v0 ~]# geta -r 1.2.3.4
> 1.2.3.4
> Reverse map: geta.test.nonexist
> [root@straylight:v0 ~]#
Darn.. I should have tested it. :)
It would be nice of having such a tool in the base system, not in the
ports.
But I guess I won't win this one and I guess that "this pr can be
closed" then. :)
thanks.
a.
State Changed From-To: open->closed There seem to be plenty of tools available for this with respect to the demand. Since this topic hasn't come up again for a while, close this up. |