From owner-freebsd-net Sun Mar 25 23:55:49 2001 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id 420B137B71D for ; Sun, 25 Mar 2001 23:55:44 -0800 (PST) (envelope-from itojun@itojun.org) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W) with ESMTP id QAA00140; Mon, 26 Mar 2001 16:55:29 +0900 (JST) To: Alex Rousskov Cc: net@FreeBSD.ORG In-reply-to: rousskov's message of Mon, 26 Mar 2001 00:49:06 MST. X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: proper way to test for INET/INET6? From: itojun@iijlab.net Date: Mon, 26 Mar 2001 16:55:29 +0900 Message-ID: <138.985593329@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> what are you planning to do after checking IPv6 support in the kernel? >> applications should be written so that it would work on both >> IPv4-only, IPv6-only and IPv4/v6 dual stack kernels, by using >> getaddrinfo(3) and getnameinfo(3). you do not need to check if you >> write applications properly. >Yes, in the ideal world that might be true. In the real world, one has >to rely on ./configure and other awful hacks to just declare a couple >of innocent-looking address-related variables (and to compile on more >than one platform). in that case, AC_CHECK_FUNCS(getaddrinfo getnameinfo) should be enough. build environment must not be checked for the presense of particular protocol support. suppose you are building FreeBSD package directory on IPv4-only machine, and someone will pick that compiled binary package on IPv4/v6 dual stack machine. if configure checks for the presense of AF_INET6 support on build machine, the compiled binary package won't support IPv6 on IPv4/v6 dual stack machine. itojun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message