Make Dictionary templatable so it can be used where we want a higher capacity.
This commit is contained in:
parent
3ee15e65aa
commit
b2d048aa0e
12 changed files with 67 additions and 49 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue