summaryrefslogtreecommitdiff
path: root/osdep/ManagedRoute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/ManagedRoute.cpp')
-rw-r--r--osdep/ManagedRoute.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp
index d7c80704..453d810a 100644
--- a/osdep/ManagedRoute.cpp
+++ b/osdep/ManagedRoute.cpp
@@ -46,7 +46,9 @@
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifndef ZT_SDK
#include <net/route.h>
+#endif
#include <net/if.h>
#ifdef __BSD__
#include <net/if_dl.h>
@@ -109,6 +111,7 @@ struct _RTE
#ifdef __BSD__ // ------------------------------------------------------------
#define ZT_ROUTING_SUPPORT_FOUND 1
+#ifndef ZT_SDK
static std::vector<_RTE> _getRTEs(const InetAddress &target,bool contains)
{
std::vector<_RTE> rtes;
@@ -243,9 +246,11 @@ static std::vector<_RTE> _getRTEs(const InetAddress &target,bool contains)
return rtes;
}
+#endif
static void _routeCmd(const char *op,const InetAddress &target,const InetAddress &via,const char *ifscope,const char *localInterface)
{
+ //char f1[1024],f2[1024]; printf("%s %s %s %s %s\n",op,target.toString(f1),via.toString(f2),ifscope,localInterface);
long p = (long)fork();
if (p > 0) {
int exitcode = -1;
@@ -408,6 +413,7 @@ static bool _winHasRoute(const NET_LUID &interfaceLuid, const NET_IFINDEX &inter
* Linux default route override implies asymmetric routes, which then
* trigger Linux's "martian packet" filter. */
+#ifndef ZT_SDK
bool ManagedRoute::sync()
{
#ifdef __WINDOWS__
@@ -518,6 +524,7 @@ bool ManagedRoute::sync()
return true;
}
+#endif
void ManagedRoute::remove()
{
@@ -561,4 +568,4 @@ void ManagedRoute::remove()
_applied.clear();
}
-} // namespace ZeroTier
+} // namespace ZeroTier \ No newline at end of file