summaryrefslogtreecommitdiff
path: root/osnet
diff options
context:
space:
mode:
Diffstat (limited to 'osnet')
-rw-r--r--osnet/LinuxEthernetTap.cpp6
-rw-r--r--osnet/LinuxEthernetTap.hpp5
-rw-r--r--osnet/LinuxEthernetTapFactory.cpp9
-rw-r--r--osnet/LinuxEthernetTapFactory.hpp5
-rw-r--r--osnet/OSXEthernetTap.cpp11
-rw-r--r--osnet/OSXEthernetTap.hpp5
-rw-r--r--osnet/OSXEthernetTapFactory.cpp9
-rw-r--r--osnet/OSXEthernetTapFactory.hpp5
8 files changed, 14 insertions, 41 deletions
diff --git a/osnet/LinuxEthernetTap.cpp b/osnet/LinuxEthernetTap.cpp
index d77d56c0..a04fd4b7 100644
--- a/osnet/LinuxEthernetTap.cpp
+++ b/osnet/LinuxEthernetTap.cpp
@@ -52,9 +52,9 @@
#include <set>
#include <algorithm>
-#include "../Constants.hpp"
-#include "../Utils.hpp"
-#include "../Mutex.hpp"
+#include "../node/Constants.hpp"
+#include "../node/Utils.hpp"
+#include "../node/Mutex.hpp"
#include "LinuxEthernetTap.hpp"
// ff:ff:ff:ff:ff:ff with no ADI
diff --git a/osnet/LinuxEthernetTap.hpp b/osnet/LinuxEthernetTap.hpp
index f74fdf86..0dfb504b 100644
--- a/osnet/LinuxEthernetTap.hpp
+++ b/osnet/LinuxEthernetTap.hpp
@@ -33,9 +33,8 @@
#include <stdexcept>
-#include "../EthernetTap.hpp"
-#include "../Mutex.hpp"
-#include "../Thread.hpp"
+#include "../node/EthernetTap.hpp"
+#include "../node/Thread.hpp"
namespace ZeroTier {
diff --git a/osnet/LinuxEthernetTapFactory.cpp b/osnet/LinuxEthernetTapFactory.cpp
index 01633abb..59327fff 100644
--- a/osnet/LinuxEthernetTapFactory.cpp
+++ b/osnet/LinuxEthernetTapFactory.cpp
@@ -71,13 +71,4 @@ void LinuxEthernetTapFactory::close(EthernetTap *tap,bool destroyPersistentDevic
delete tap;
}
-std::vector<std::string> allTapDeviceNames() const
-{
- std::vector<std::string> dn;
- Mutex::Lock _l(_devices_m);
- for(std::vector<EthernetTap *>::const_iterator d(_devices.begin());d!=_devices.end();++d)
- dn.push_back(d->deviceName());
- return dn;
-}
-
} // namespace ZeroTier
diff --git a/osnet/LinuxEthernetTapFactory.hpp b/osnet/LinuxEthernetTapFactory.hpp
index 695fe52e..6cbf4ffc 100644
--- a/osnet/LinuxEthernetTapFactory.hpp
+++ b/osnet/LinuxEthernetTapFactory.hpp
@@ -31,8 +31,8 @@
#include <vector>
#include <string>
-#include "../EthernetTapFactory.hpp"
-#include "../Mutex.hpp"
+#include "../node/EthernetTapFactory.hpp"
+#include "../node/Mutex.hpp"
namespace ZeroTier {
@@ -52,7 +52,6 @@ public:
void (*handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &),
void *arg);
virtual void close(EthernetTap *tap,bool destroyPersistentDevices);
- virtual std::vector<std::string> allTapDeviceNames() const;
private:
std::vector<EthernetTap *> _devices;
diff --git a/osnet/OSXEthernetTap.cpp b/osnet/OSXEthernetTap.cpp
index 164b24a2..2fd2f285 100644
--- a/osnet/OSXEthernetTap.cpp
+++ b/osnet/OSXEthernetTap.cpp
@@ -259,9 +259,8 @@ static inline void _intl_freeifmaddrs(struct _intl_ifmaddrs *ifmp)
#include <set>
#include <algorithm>
-#include "../Constants.hpp"
-#include "../Utils.hpp"
-#include "../Mutex.hpp"
+#include "../node/Constants.hpp"
+#include "../node/Utils.hpp"
#include "OSXEthernetTap.hpp"
// ff:ff:ff:ff:ff:ff with no ADI
@@ -314,7 +313,6 @@ namespace ZeroTier {
static Mutex __tapCreateLock;
OSXEthernetTap::OSXEthernetTap(
- const RuntimeEnvironment *renv,
const char *tryToGetDevice,
const MAC &mac,
unsigned int mtu,
@@ -447,11 +445,8 @@ bool OSXEthernetTap::addIP(const InetAddress &ip)
// Remove and reconfigure if address is the same but netmask is different
for(std::set<InetAddress>::iterator i(allIps.begin());i!=allIps.end();++i) {
if ((i->ipsEqual(ip))&&(i->netmaskBits() != ip.netmaskBits())) {
- if (___removeIp(_dev,*i)) {
+ if (___removeIp(_dev,*i))
break;
- } else {
- LOG("WARNING: failed to remove old IP/netmask %s to replace with %s",i->toString().c_str(),ip.toString().c_str());
- }
}
}
diff --git a/osnet/OSXEthernetTap.hpp b/osnet/OSXEthernetTap.hpp
index 680fef15..94c65b3a 100644
--- a/osnet/OSXEthernetTap.hpp
+++ b/osnet/OSXEthernetTap.hpp
@@ -33,9 +33,8 @@
#include <stdexcept>
-#include "../EthernetTap.hpp"
-#include "../Mutex.hpp"
-#include "../Thread.hpp"
+#include "../node/EthernetTap.hpp"
+#include "../node/Thread.hpp"
namespace ZeroTier {
diff --git a/osnet/OSXEthernetTapFactory.cpp b/osnet/OSXEthernetTapFactory.cpp
index 223cec7f..ec9543d8 100644
--- a/osnet/OSXEthernetTapFactory.cpp
+++ b/osnet/OSXEthernetTapFactory.cpp
@@ -114,13 +114,4 @@ void OSXEthernetTapFactory::close(EthernetTap *tap,bool destroyPersistentDevices
delete tap;
}
-std::vector<std::string> allTapDeviceNames() const
-{
- std::vector<std::string> dn;
- Mutex::Lock _l(_devices_m);
- for(std::vector<EthernetTap *>::const_iterator d(_devices.begin());d!=_devices.end();++d)
- dn.push_back(d->deviceName());
- return dn;
-}
-
} // namespace ZeroTier
diff --git a/osnet/OSXEthernetTapFactory.hpp b/osnet/OSXEthernetTapFactory.hpp
index 2368d982..45d6eab5 100644
--- a/osnet/OSXEthernetTapFactory.hpp
+++ b/osnet/OSXEthernetTapFactory.hpp
@@ -31,8 +31,8 @@
#include <vector>
#include <string>
-#include "../EthernetTapFactory.hpp"
-#include "../Mutex.hpp"
+#include "../node/EthernetTapFactory.hpp"
+#include "../node/Mutex.hpp"
namespace ZeroTier {
@@ -63,7 +63,6 @@ public:
void (*handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &),
void *arg);
virtual void close(EthernetTap *tap,bool destroyPersistentDevices);
- virtual std::vector<std::string> allTapDeviceNames() const;
private:
std::vector<EthernetTap *> _devices;