summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-08 19:03:30 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-08 19:03:30 -0700
commit7192fe6d15265a8f3ae65631e464837fd396d4b6 (patch)
tree573513ef5e480780bfc4d35a899f683511d65c9f /node
parentd76133046518e71025000ec6322f5b8f1c98529f (diff)
downloadinfinitytier-7192fe6d15265a8f3ae65631e464837fd396d4b6.tar.gz
infinitytier-7192fe6d15265a8f3ae65631e464837fd396d4b6.zip
osdep/ compile fixes, and remove some lingering OS-specific stuff from node/Defaults
Diffstat (limited to 'node')
-rw-r--r--node/Defaults.cpp85
-rw-r--r--node/Defaults.hpp21
2 files changed, 0 insertions, 106 deletions
diff --git a/node/Defaults.cpp b/node/Defaults.cpp
index c235ef2c..e64f3844 100644
--- a/node/Defaults.cpp
+++ b/node/Defaults.cpp
@@ -48,40 +48,6 @@ namespace ZeroTier {
const Defaults ZT_DEFAULTS;
-static inline std::string _mkDefaultHomePath()
-{
-#ifdef __UNIX_LIKE__
-
-#ifdef __APPLE__
- // /Library/... on Apple
- return std::string("/Library/Application Support/ZeroTier/One");
-#else
-
-#ifdef __FreeBSD__
- // FreeBSD likes /var/db instead of /var/lib
- return std::string("/var/db/zerotier-one");
-#else
- // Use /var/lib for Linux and other *nix
- return std::string("/var/lib/zerotier-one");
-#endif
-
-#endif
-
-#else // not __UNIX_LIKE__
-
-#ifdef __WINDOWS__
- // Look up app data folder on Windows, e.g. C:\ProgramData\...
- char buf[16384];
- if (SUCCEEDED(SHGetFolderPathA(NULL,CSIDL_COMMON_APPDATA,NULL,0,buf)))
- return (std::string(buf) + "\\ZeroTier\\One");
- else return std::string("C:\\ZeroTier\\One");
-#else
-#error Unknown platform, please define a default home path!
-#endif
-
-#endif // __UNIX_LIKE__ or not...
-}
-
static inline std::map< Address,Identity > _mkRootTopologyAuth()
{
std::map< Address,Identity > ua;
@@ -106,60 +72,9 @@ static inline std::map< Address,Identity > _mkRootTopologyAuth()
return ua;
}
-static inline std::map< Address,Identity > _mkUpdateAuth()
-{
- std::map< Address,Identity > ua;
-
- { // 0001
- Identity id("e9bc3707b5:0:c4cef17bde99eadf9748c4fd11b9b06dc5cd8eb429227811d2c336e6b96a8d329e8abd0a4f45e47fe1bcebf878c004c822d952ff77fc2833af4c74e65985c435");
- ua[id.address()] = id;
- }
- { // 0002
- Identity id("56520eaf93:0:7d858b47988b34399a9a31136de07b46104d7edb4a98fa1d6da3e583d3a33e48be531532b886f0b12cd16794a66ab9220749ec5112cbe96296b18fe0cc79ca05");
- ua[id.address()] = id;
- }
- { // 0003
- Identity id("7c195de2e0:0:9f659071c960f9b0f0b96f9f9ecdaa27c7295feed9c79b7db6eedcc11feb705e6dd85c70fa21655204d24c897865b99eb946b753a2bbcf2be5f5e006ae618c54");
- ua[id.address()] = id;
- }
- { // 0004
- Identity id("415f4cfde7:0:54118e87777b0ea5d922c10b337c4f4bd1db7141845bd54004b3255551a6e356ba6b9e1e85357dbfafc45630b8faa2ebf992f31479e9005f0472685f2d8cbd6e");
- ua[id.address()] = id;
- }
-
- return ua;
-}
-
-static inline const char *_mkUpdateUrl()
-{
-#if defined(__LINUX__) && ( defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__i386) )
- if (sizeof(void *) == 8)
- return "http://download.zerotier.com/ZeroTierOneInstaller-linux-x64-LATEST.nfo";
- else return "http://download.zerotier.com/ZeroTierOneInstaller-linux-x86-LATEST.nfo";
-#define GOT_UPDATE_URL
-#endif
-
-#ifdef __APPLE__
- return "http://download.zerotier.com/ZeroTierOneInstaller-mac-combined-LATEST.nfo";
-#define GOT_UPDATE_URL
-#endif
-
-#ifdef __WINDOWS__
- return "http://download.zerotier.com/ZeroTierOneInstaller-windows-intel-LATEST.nfo";
-#define GOT_UPDATE_URL
-#endif
-
-#ifndef GOT_UPDATE_URL
- return "";
-#endif
-}
-
Defaults::Defaults() :
- defaultHomePath(_mkDefaultHomePath()),
defaultRootTopology((const char *)ZT_DEFAULT_ROOT_TOPOLOGY,ZT_DEFAULT_ROOT_TOPOLOGY_LEN),
rootTopologyAuthorities(_mkRootTopologyAuth()),
- updateAuthorities(_mkUpdateAuth()),
- updateLatestNfoURL(_mkUpdateUrl()),
v4Broadcast(((uint32_t)0xffffffff),ZT1_DEFAULT_PORT)
{
}
diff --git a/node/Defaults.hpp b/node/Defaults.hpp
index a4c839ea..c1df919b 100644
--- a/node/Defaults.hpp
+++ b/node/Defaults.hpp
@@ -52,11 +52,6 @@ public:
Defaults();
/**
- * Default home path for this platform
- */
- const std::string defaultHomePath;
-
- /**
* Default root topology dictionary
*/
const std::string defaultRootTopology;
@@ -67,22 +62,6 @@ public:
const std::map< Address,Identity > rootTopologyAuthorities;
/**
- * Identities permitted to sign software updates
- *
- * ZTN can keep multiple signing identities and rotate them, keeping some in
- * "cold storage" and obsoleting others gradually.
- *
- * If you don't build with ZT_OFFICIAL_BUILD, this isn't used since your
- * build will not auto-update.
- */
- const std::map< Address,Identity > updateAuthorities;
-
- /**
- * URL to latest .nfo for software updates
- */
- const std::string updateLatestNfoURL;
-
- /**
* Address for IPv4 LAN auto-location broadcasts: 255.255.255.255:9993
*/
const InetAddress v4Broadcast;