diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-21 07:32:58 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-06-21 07:32:58 -0700 |
commit | b2d048aa0e01a350eaf524cc752ca5fa9a5a1140 (patch) | |
tree | 87c21bc63242efe25ffe4fcb1cde3ff8518046d6 /node/NetworkConfig.hpp | |
parent | 3ee15e65aa14a8aa661c522c5fb183a0fdfed8b3 (diff) | |
download | infinitytier-b2d048aa0e01a350eaf524cc752ca5fa9a5a1140.tar.gz infinitytier-b2d048aa0e01a350eaf524cc752ca5fa9a5a1140.zip |
Make Dictionary templatable so it can be used where we want a higher capacity.
Diffstat (limited to 'node/NetworkConfig.hpp')
-rw-r--r-- | node/NetworkConfig.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp index 30d8c9fc..c137a2a5 100644 --- a/node/NetworkConfig.hpp +++ b/node/NetworkConfig.hpp @@ -64,6 +64,9 @@ namespace ZeroTier { +// Maximum size of a network config dictionary (can be increased) +#define ZT_NETWORKCONFIG_DICT_CAPACITY 8194 + // Network config version #define ZT_NETWORKCONFIG_VERSION 6 @@ -234,7 +237,7 @@ public: * @param includeLegacy If true, include legacy fields for old node versions * @return True if dictionary was successfully created, false if e.g. overflow */ - bool toDictionary(Dictionary &d,bool includeLegacy) const; + bool toDictionary(Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d,bool includeLegacy) const; /** * Read this network config from a dictionary @@ -242,7 +245,7 @@ public: * @param d Dictionary * @return True if dictionary was valid and network config successfully initialized */ - bool fromDictionary(const Dictionary &d); + bool fromDictionary(const Dictionary<ZT_NETWORKCONFIG_DICT_CAPACITY> &d); /** * @return True if passive bridging is allowed (experimental) |