In article <14714.58128.671428.615269(a)mule.m17n.org> (at Sun, 23 Jul 2000 21:20:32
+0900 (JST)), Martin Buchholz <martin(a)xemacs.org> says:
I mean, which implementation of getaddrinfo?
Early implementations will be buggy. For example, the implementations
of getaddrinfo() in AIX 4 and in Red Hat 6.0 are claimed to be buggy.
Well,
1. What version of glibc comes with RedHat 6.0?
(2.0.x? I'm a Debian GNU user and I don't know much about Red Hat.)
2. Could you show me your autoconf test around this?
So what is a free software project to do, when it is not primarily a
networking application, but uses the network incidentally? Most users
of XEmacs do not use the network functionality much. So how to get
the most reliable XEmacs? We have an autoconf test for
getaddrinfo(). Perhaps we:
If the checking algorythm has no problems and it claims some
implementation of getaddrinfo() to be buggy, you may want to
use free implementation of getaddrinfo(), gethostbyname()
instead of getaddrinfo(). So,
0. Check if your autoconf script is correct.
1. Check if you have non-buggy getaddrinfo().
2. Add AI_* conflict check like below.
3. Check if your getaddrinfo() accept AI_ADDRCONFIG.
4. If 1-3 fails, use free implementation of getaddrinfo(), or use
gethostbyname() instead.
I recommend you define new configuration-variable (or runtime option)
so that user can configure the protocol family that will be given to
getaddrinfo() as "hints" to solve the problem that it would take long
time to resolve nodename.
dnl ====================================================================
dnl IN6_FUNC_GETADDRINFO_AI_FLAGS(act-ok[,act-ng[,act-cross-compiling]])
dnl (C)2000 Hideaki YOSHIFUji / USAGI Project.
dnl ====================================================================
AC_DEFUN(IN6_FUNC_GETADDRINFO_AI_FLAGS,[
AC_MSG_CHECKING([whether you could use AI_{ADDRCONFIG,ALL,V4MAPPED} for getaddrinfo])
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main(){
int ret = 0;
ret = ((AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED) &
(AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST));
return ret;
}
],[ AC_MSG_RESULT(yes)
$1
],[ AC_MSG_RESULT(no)
$2
],[ AC_MSG_RESULT(unknown)
$3
])])
Hideaki, are you saying that setting hints.ai_family to PF_INET will
"work" for almost all implementations that actually have a getaddrinfo
function. For example, is this likely to avoid problems on AIX 4?
Sorry, I have no idea about getaddrinfo() on AIX 4.
(I know KAME, Linux+glibc 2.1.{2,3} and Solaris 8 seems ok.
Solaris 7 + IPv6_Prototype_01 is buggy.).
If I had an access to AIX 4, I could check its behavior.
Anyway, could you send us some BUGGY examples?
And, basically, what do you mean by "BUGGY" or "PROEBLEMs"?
We know nothing about original thread.
# Sorry, I have to do some personal work (deadline is today
# (24th July), JST).
# So, my next reply will be next night, or so.
# If you explain your problem accurately,
# other people on 6bone-jp can help you.
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji(a)v6.linux.or.jp>
Web Page:
http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515 1323 1806 A96F 5700 6B25