Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 1996 21:47:29 -0700
From:      bmah@cs.berkeley.edu (Bruce A. Mah)
To:        freebsd-hackers@freebsd.org
Cc:        bmah@cs.berkeley.edu
Subject:   Resolver questions
Message-ID:  <199610270447.VAA31877@conviction.CS.Berkeley.EDU>

next in thread | raw e-mail | index | archive | help
I was looking through the resolver client library this evening, and came 
across some code I don't understand.  getnetbyname(3) will, depending on the 
contents of /etc/host.conf, call _getnetbydnsname(), which is in 
lib/libc/net/getnetbydns.c.  This function then calls res_search(3), 
presumably to do a lookup on a network name.  This would, in my limited 
understanding of BIND, involve looking up an A record.  But it really asks for 
a PTR record:

	anslen = res_search(qbuf, C_IN, T_PTR, buf.buf, sizeof buf.buf);
	                                ^^^^^
This makes no sense to me...I must be missing something.  Can someone 
enlighten this poor, confused soul?

Thanks,

Bruce.

PS.  My machine runs 2.1.0-RELEASE, but from a quick glance, 2.2-CURRENT has 
this code too.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610270447.VAA31877>