summaryrefslogtreecommitdiffstats
path: root/source/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
commit327875182c9219aeba687e10aaea93546d9a70ea (patch)
treedd0b64a039570bb555f2f181494ae7b74a325739 /source/include
parentf5b089370a4a8e23d656276d06febb041729743d (diff)
downloadsamba-327875182c9219aeba687e10aaea93546d9a70ea.tar.gz
samba-327875182c9219aeba687e10aaea93546d9a70ea.tar.xz
samba-327875182c9219aeba687e10aaea93546d9a70ea.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.
Diffstat (limited to 'source/include')
-rw-r--r--source/include/includes.h4
-rw-r--r--source/include/interfaces.h15
2 files changed, 17 insertions, 2 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 4f11e7a0932..b084eed40cd 100644
--- a/source/include/includes.h
+++ b/source/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/source/include/interfaces.h b/source/include/interfaces.h
index 3b786f1ebcb..371f64292f6 100644
--- a/source/include/interfaces.h
+++ b/source/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;
};