summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-02 02:21:09 -0500
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-02 02:21:09 -0500
commit0fdefdf7a4fb288d42fbc06d1e05890dd55439f7 (patch)
tree97d1f1022223efd2e958bf9e0701207d3dcceb22
parent8236f20759565a1363f21539e567c0e4d81ea787 (diff)
downloadinfinitytier-0fdefdf7a4fb288d42fbc06d1e05890dd55439f7.tar.gz
infinitytier-0fdefdf7a4fb288d42fbc06d1e05890dd55439f7.zip
So Linux has getifaddrs() too! Yay!
-rw-r--r--node/EthernetTap.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/node/EthernetTap.cpp b/node/EthernetTap.cpp
index 59613da1..86e96f33 100644
--- a/node/EthernetTap.cpp
+++ b/node/EthernetTap.cpp
@@ -130,6 +130,7 @@ static const _CommandFinder UNIX_COMMANDS;
#include <linux/if_tun.h>
#include <linux/if_addr.h>
#include <linux/if_ether.h>
+#include <ifaddrs.h>
#endif // __LINUX__
#ifdef __APPLE__
@@ -569,7 +570,6 @@ bool EthernetTap::removeIP(const InetAddress &ip)
return false;
}
-#ifdef __APPLE__
std::set<InetAddress> EthernetTap::ips() const
{
struct ifaddrs *ifa = (struct ifaddrs *)0;
@@ -606,11 +606,6 @@ std::set<InetAddress> EthernetTap::ips() const
return r;
}
-#else
-std::set<InetAddress> EthernetTap::ips() const
-{
-}
-#endif
void EthernetTap::put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len)
{