From owner-freebsd-hackers Sat Oct 26 21:47:35 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA04786 for hackers-outgoing; Sat, 26 Oct 1996 21:47:35 -0700 (PDT) Received: from conviction.CS.Berkeley.EDU (conviction.CS.Berkeley.EDU [128.32.33.103]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id VAA04778 for ; Sat, 26 Oct 1996 21:47:32 -0700 (PDT) Received: from conviction.CS.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by conviction.CS.Berkeley.EDU (8.8.2/8.8.2) with ESMTP id VAA31877; Sat, 26 Oct 1996 21:47:30 -0700 (PDT) Message-Id: <199610270447.VAA31877@conviction.CS.Berkeley.EDU> X-Mailer: exmh version 1.6.9 8/22/96 To: freebsd-hackers@freebsd.org cc: bmah@cs.berkeley.edu Subject: Resolver questions From: bmah@cs.berkeley.edu (Bruce A. Mah) Reply-to: bmah@cs.berkeley.edu X-Face: g~c`.{#4q0"(V*b#g[i~rXgm*w;:nMfz%_RZLma)UgGN&=j`5vXoU^@n5v4:OO)c["!w)nD/!!~e4Sj7LiT'6*wZ83454H""lb{CC%T37O!!'S$S&D}sem7I[A 2V%N&+ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 26 Oct 1996 21:47:29 -0700 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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.