summaryrefslogtreecommitdiff
path: root/service/OneService.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'service/OneService.hpp')
-rw-r--r--service/OneService.hpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/service/OneService.hpp b/service/OneService.hpp
index 3390f2ac..3b670e4a 100644
--- a/service/OneService.hpp
+++ b/service/OneService.hpp
@@ -1,6 +1,6 @@
/*
* ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016 ZeroTier, Inc. https://www.zerotier.com/
+ * Copyright (C) 2011-2018 ZeroTier, Inc. https://www.zerotier.com/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,6 +14,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * --
+ *
+ * You can be released from the requirements of the license by purchasing
+ * a commercial license. Buying such a license is mandatory as soon as you
+ * develop commercial closed-source software that incorporates or links
+ * directly against ZeroTier software without disclosing the source code
+ * of your own application.
*/
#ifndef ZT_ONESERVICE_HPP
@@ -24,6 +32,13 @@
#include "../node/InetAddress.hpp"
+#ifdef ZT_SDK
+#include "../node/Node.hpp"
+// Use the virtual netcon endpoint instead of a tun/tap port driver
+#include "../include/VirtualTap.h"
+namespace ZeroTier { typedef VirtualTap EthernetTap; }
+#endif
+
namespace ZeroTier {
/**
@@ -131,6 +146,15 @@ public:
*/
virtual std::string portDeviceName(uint64_t nwid) const = 0;
+#ifdef ZT_SDK
+ virtual void leave(const uint64_t hp) = 0;
+ virtual void join(const uint64_t hp) = 0;
+ virtual std::string givenHomePath() = 0;
+ virtual Node * getNode() = 0;
+ virtual void removeNets() = 0;
+ virtual std::vector<ZT_VirtualNetworkRoute> *getRoutes(uint64_t nwid) = 0;
+#endif
+
/**
* Terminate background service (can be called from other threads)
*/