From owner-freebsd-questions@FreeBSD.ORG Sun Jul 13 08:15:11 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05A0E1065672 for ; Sun, 13 Jul 2008 08:15:11 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [206.117.18.8]) by mx1.freebsd.org (Postfix) with ESMTP id DA2648FC14 for ; Sun, 13 Jul 2008 08:15:10 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from [10.0.1.196] (pool-71-109-162-173.lsanca.dsl-w.verizon.net [71.109.162.173]) (authenticated bits=0) by zoom.lafn.org (8.14.2/8.14.2) with ESMTP id m6D8F9mS085645 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sun, 13 Jul 2008 01:15:09 -0700 (PDT) (envelope-from bc979@lafn.org) Message-Id: <8E33E385-4B77-4F05-86C0-F08B5E9E4F18@lafn.org> From: Doug Hardie To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Sun, 13 Jul 2008 01:15:08 -0700 X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV 0.92.1/7697/Sat Jul 12 22:26:36 2008 on zoom.lafn.org X-Virus-Status: Clean Subject: IPv6 Host Names X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2008 08:15:11 -0000 I am using the getnameinfo function to convert an IPv6 IP address to its name. This works properly if the host info is in DNS. However, if its in the /etc/hosts file and not DNS then all getnameinfo returns is the IP address. If i call it with an IPv4 IP address then it looks up the host name in /etc/hosts. I have tried various host entries: fe80::216:cbff:febd:a4e5 mbook6 fe80::216:cbff:febd:a4e5%rl0 mbook6 fe80::216:cbff:febd:a4e5%rl0 mbook6.local Is there a way to get getname info to obtain host names from the /etc/ hosts file. The nsswitch.conf file has files dns