From owner-freebsd-net@FreeBSD.ORG Tue May 27 18:53:27 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65320106566C for ; Tue, 27 May 2008 18:53:27 +0000 (UTC) (envelope-from Jinmei_Tatuya@isc.org) Received: from mon.jinmei.org (mon.jinmei.org [IPv6:2001:4f8:3:36::162]) by mx1.freebsd.org (Postfix) with ESMTP id 57D108FC16 for ; Tue, 27 May 2008 18:53:27 +0000 (UTC) (envelope-from Jinmei_Tatuya@isc.org) Received: from jmb.jinmei.org (unknown [IPv6:2001:4f8:3:bb:217:f2ff:fee0:a91f]) by mon.jinmei.org (Postfix) with ESMTP id D691233C2E; Tue, 27 May 2008 11:53:26 -0700 (PDT) Date: Tue, 27 May 2008 11:53:26 -0700 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Steve Bertrand In-Reply-To: <483B3E7F.8000907@ibctech.ca> References: <483B3E7F.8000907@ibctech.ca> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: IPv6/IPv4 DNS resolver source X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2008 18:53:27 -0000 At Mon, 26 May 2008 18:49:35 -0400, Steve Bertrand wrote: > Is there anyone here who can advise me where in the source tree I would > find the DNS resolver code that performs AAAA/A record lookups, and more > specifically, the fallback to A lookup if AAAA fails? Assuming you're considering getaddrinfo(), see res_queryN() in lib/libc/net/getaddrinfo.c. BTW: "fallback" does not really accurately describe the behavior. When AF_UNPSEC is specified, both AAAA and A queries are issued, whether or not the AAAA query fails. --- JINMEI, Tatuya Internet Systems Consortium, Inc.