diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-26 08:42:49 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-26 08:42:49 -0700 |
commit | 72def658d0ad8dda1e1735f6b28a7a0ec0235c22 (patch) | |
tree | 209b31178f76d5acf87cff65e8fde0fc377a48e2 /service | |
parent | e7cd888c7dcbc5f0248e5a839dc15f05b37361cb (diff) | |
download | infinitytier-72def658d0ad8dda1e1735f6b28a7a0ec0235c22.tar.gz infinitytier-72def658d0ad8dda1e1735f6b28a7a0ec0235c22.zip |
Add a dummy Ethernet tap and a build option to enable it.
Diffstat (limited to 'service')
-rw-r--r-- | service/OneService.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp index b151d25d..988e723d 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -89,14 +89,19 @@ using json = nlohmann::json; #include "../controller/EmbeddedNetworkController.hpp" -// Include the right tap device driver for this platform -- add new platforms here +#ifdef ZT_USE_TEST_TAP + +#include "../osdep/TestEthernetTap.hpp" +namespace ZeroTier { typedef TestEthernetTap EthernetTap; } + +#else + #ifdef ZT_SERVICE_NETCON -// In network containers builds, use the virtual netcon endpoint instead of a tun/tap port driver #include "../netcon/NetconEthernetTap.hpp" namespace ZeroTier { typedef NetconEthernetTap EthernetTap; } -#else // not ZT_SERVICE_NETCON so pick a tap driver +#else #ifdef __APPLE__ #include "../osdep/OSXEthernetTap.hpp" @@ -121,9 +126,11 @@ namespace ZeroTier { typedef BSDEthernetTap EthernetTap; } #endif // ZT_SERVICE_NETCON +#endif // ZT_USE_TEST_TAP + // Sanity limits for HTTP #define ZT_MAX_HTTP_MESSAGE_SIZE (1024 * 1024 * 64) -#define ZT_MAX_HTTP_CONNECTIONS 64 +#define ZT_MAX_HTTP_CONNECTIONS 65536 // Interface metric for ZeroTier taps -- this ensures that if we are on WiFi and also // bridged via ZeroTier to the same LAN traffic will (if the OS is sane) prefer WiFi. |