summaryrefslogtreecommitdiff
path: root/source3/lib/replace/system/network.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-21 09:53:00 -0800
committerJeremy Allison <jra@samba.org>2008-02-21 09:53:00 -0800
commit3a376f1cfa25f79eab8f41a42383f1bd982830ff (patch)
treec79b241e6b811dd058f7791cdb561587b1533db1 /source3/lib/replace/system/network.h
parent34f23b7ea755eaef6012b653fbcff42714dddcb7 (diff)
parentbf6dbf8e1b371770a2c9df99b27569c36587df39 (diff)
downloadsamba-3a376f1cfa25f79eab8f41a42383f1bd982830ff.tar.gz
samba-3a376f1cfa25f79eab8f41a42383f1bd982830ff.tar.bz2
samba-3a376f1cfa25f79eab8f41a42383f1bd982830ff.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit beb0a76b93f9dd054dbc4192516e7008e59b27d9)
Diffstat (limited to 'source3/lib/replace/system/network.h')
-rw-r--r--source3/lib/replace/system/network.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h
index aff8a841da..d09e3f71f8 100644
--- a/source3/lib/replace/system/network.h
+++ b/source3/lib/replace/system/network.h
@@ -6,6 +6,7 @@
networking system include wrappers
Copyright (C) Andrew Tridgell 2004
+ Copyright (C) Jelmer Vernooij 2007
** NOTE! The following LGPL license applies to the replace
** library. This does NOT imply that all of Samba is released
@@ -97,6 +98,31 @@ int rep_inet_pton(int af, const char *src, void *dst);
const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#endif
+#ifdef HAVE_IFADDRS_H
+#include <ifaddrs.h>
+#endif
+
+#ifndef HAVE_STRUCT_IFADDRS
+struct ifaddrs {
+ struct ifaddrs *ifa_next; /* Pointer to next struct */
+ char *ifa_name; /* Interface name */
+ unsigned int ifa_flags; /* Interface flags */
+ struct sockaddr *ifa_addr; /* Interface address */
+ struct sockaddr *ifa_netmask; /* Interface netmask */
+#undef ifa_dstaddr
+ struct sockaddr *ifa_dstaddr; /* P2P interface destination */
+ void *ifa_data; /* Address specific data */
+};
+#endif
+
+#ifndef HAVE_GETIFADDRS
+int rep_getifaddrs(struct ifaddrs **);
+#endif
+
+#ifndef HAVE_FREEIFADDRS
+void rep_freeifaddrs(struct ifaddrs *);
+#endif
+
/*
* Some systems have getaddrinfo but not the
* defines needed to use it.