summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-02 19:27:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:06 -0500
commit3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941 (patch)
treea39948ec0633b6bed73df92ddc0c94dc4c607f12 /source3/include
parent5c5acae0eee9fb113ac6817eb8a164551a1cb117 (diff)
downloadsamba-3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941.tar.gz
samba-3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941.tar.bz2
samba-3fbd1ae54ced2eb889a8fe0a6ea32dfd8175f941.zip
r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently we only return IPv4 af_families. Needs fixing for binds to IPv6 but this has to be careful work. Jeremy. (This used to be commit 327875182c9219aeba687e10aaea93546d9a70ea)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/includes.h4
-rw-r--r--source3/include/interfaces.h15
2 files changed, 17 insertions, 2 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 4f11e7a093..b084eed40c 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1262,4 +1262,8 @@ void exit_server_fault(void) NORETURN_ATTRIBUTE ;
#include "libnscd.h"
#endif
+#ifndef HAVE_SA_FAMILY_T
+typedef unsigned short int sa_family_t;
+#endif
+
#endif /* _INCLUDES_H */
diff --git a/source3/include/interfaces.h b/source3/include/interfaces.h
index 3b786f1ebc..371f64292f 100644
--- a/source3/include/interfaces.h
+++ b/source3/include/interfaces.h
@@ -7,6 +7,17 @@
struct iface_struct {
char name[16];
- struct in_addr ip;
- struct in_addr netmask;
+ sa_family_t sa_family;
+ union {
+ struct in_addr ip;
+#ifdef AF_INET6
+ struct in6_addr ip6;
+#endif
+ } iface_addr;
+ union {
+ struct in_addr netmask;
+#ifdef AF_INET6
+ struct in6_addr netmask6;
+#endif
+ } iface_netmask;
};