Date: Mon, 26 Mar 2001 16:55:29 +0900 From: itojun@iijlab.net To: Alex Rousskov <rousskov@measurement-factory.com> Cc: net@FreeBSD.ORG Subject: Re: proper way to test for INET/INET6? Message-ID: <138.985593329@coconut.itojun.org> In-Reply-To: rousskov's message of Mon, 26 Mar 2001 00:49:06 MST. <Pine.BSF.4.10.10103260045260.86491-100000@measurement-factory.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?138.985593329>