aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-10-05 21:04:04 +0000
committerKen Raeburn <raeburn@mit.edu>2004-10-05 21:04:04 +0000
commit4ed91a6476bb8db923346e6f38b7045c7649eadb (patch)
tree546d8f8df4cb81d4fee368af23e61a62f0b86d4f
parentfbd3bc2ea0baaf37433fea3c7040f8dd3c6df3ba (diff)
downloadkrb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.zip
krb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.tar.gz
krb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.tar.bz2
* fake-addrinfo.h (AI_ADDRCONFIG, AI_V4MAPPED, AI_ALL): If not defined, or when
completely faking getaddrinfo, define them as zero. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16803 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/include/fake-addrinfo.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h
index 2e11fef..cc23a3f 100644
--- a/src/include/fake-addrinfo.h
+++ b/src/include/fake-addrinfo.h
@@ -362,17 +362,18 @@ struct addrinfo {
#define AI_CANONNAME 0x02
#undef AI_NUMERICHOST
#define AI_NUMERICHOST 0x04
-/* N.B.: AI_V4MAPPED, AI_ADDRCONFIG, AI_ALL, and AI_DEFAULT are part
- of the spec for getipnodeby*, and *not* part of the spec for
- getaddrinfo. Don't use them! */
+/* RFC 2553 says these are part of the interface for getipnodebyname,
+ not for getaddrinfo. RFC 3493 says they're part of the interface
+ for getaddrinfo, and getipnodeby* are deprecated. Our fake
+ getaddrinfo implementation here does IPv4 only anyways. */
#undef AI_V4MAPPED
-#define AI_V4MAPPED eeeevil!
+#define AI_V4MAPPED 0
#undef AI_ADDRCONFIG
-#define AI_ADDRCONFIG eeeevil!
+#define AI_ADDRCONFIG 0
#undef AI_ALL
-#define AI_ALL eeeevil!
+#define AI_ALL 0
#undef AI_DEFAULT
-#define AI_DEFAULT eeeevil!
+#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG)
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
@@ -561,6 +562,21 @@ int getnameinfo (const struct sockaddr *addr, socklen_t len,
#ifndef AI_NUMERICHOST
# define AI_NUMERICHOST 0
#endif
+/* Partial RFC 2553 implementations may not have AI_ADDRCONFIG and
+ friends, which RFC 3493 says are now part of the getaddrinfo
+ interface, and we'll want to use. */
+#ifndef AI_ADDRCONFIG
+# define AI_ADDRCONFIG 0
+#endif
+#ifndef AI_V4MAPPED
+# define AI_V4MAPPED 0
+#endif
+#ifndef AI_ALL
+# define AI_ALL 0
+#endif
+#ifndef AI_DEFAULT
+# define AI_DEFAULT (AI_ADDRCONFIG|AI_V4MAPPED)
+#endif
#if defined(HAVE_FAKE_GETADDRINFO) || defined(FAI_CACHE)
#define NEED_FAKE_GETADDRINFO